Skip to content

Commit

Permalink
red/blue remove (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
dxenes1 committed Jan 31, 2023
1 parent 3e12428 commit ed4a33c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
44 changes: 21 additions & 23 deletions neuvue_project/workspace/static/workspace/main.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -85859,9 +85859,9 @@ class GraphOperationLayerView extends neuroglancer_widget_tab_view__WEBPACK_IMPO
const splitRoots = this.wrapper.chunkedGraphLayer.getNewRootIdsFromSplitResponse(splitResponse);
const splitOperationId = this.wrapper.chunkedGraphLayer.getOperationIdFromOperationResponse(splitResponse);
if (splitRoots.length === 0) {
neuroglancer_status__WEBPACK_IMPORTED_MODULE_4__["StatusMessage"].showTemporaryMessage(`No split found.`, 3000);
//fail audio
Object(neuroglancer_sound_effects_ts__WEBPACK_IMPORTED_MODULE_24__["playSoundError"])();
neuroglancer_status__WEBPACK_IMPORTED_MODULE_4__["StatusMessage"].showTemporaryMessage(`No split found.`, 3000);
}
else {
//success audio
Expand All @@ -85882,33 +85882,12 @@ class GraphOperationLayerView extends neuroglancer_widget_tab_view__WEBPACK_IMPO
let splitPointscheckbox = document.getElementById('multi-split-mode-checkbox');
let splitPointsValue = splitPointscheckbox.checked;
if (splitPointsValue) {
// remove red and blue points
for (const annotation of sourceA) {
const ref = annotationLayer.sourceA.getReference(annotation.id);
try {
annotationLayer.sourceA.delete(ref);
}
finally {
ref.dispose();
}
}
for (const annotation of sourceB) {
const ref = annotationLayer.sourceB.getReference(annotation.id);
try {
annotationLayer.sourceB.delete(ref);
}
finally {
ref.dispose();
}
}
// regenerate path
console.log("Regenerating Path!!!");
console.log("Regenerating Path.");
let has_path = this.wrapper.pathFinderState.pathBetweenSupervoxels.hasPath;
if (has_path) {
// setTimeout(function() {
let find_path_button = document.getElementById('find-path-button');
find_path_button.click();
// }, 3000);
}
}
// TODO: Merge unsupported with edits
Expand All @@ -85918,6 +85897,25 @@ class GraphOperationLayerView extends neuroglancer_widget_tab_view__WEBPACK_IMPO
view.differ.ignoreChanges();
// Add splitOperationId to window
window["operation_ids"].push(splitOperationId);
// remove red and blue points
for (const annotation of sourceA) {
const ref = annotationLayer.sourceA.getReference(annotation.id);
try {
annotationLayer.sourceA.delete(ref);
}
finally {
ref.dispose();
}
}
for (const annotation of sourceB) {
const ref = annotationLayer.sourceB.getReference(annotation.id);
try {
annotationLayer.sourceB.delete(ref);
}
finally {
ref.dispose();
}
}
}
});
}
Expand Down

Large diffs are not rendered by default.

0 comments on commit ed4a33c

Please sign in to comment.