Skip to content

Commit

Permalink
hotfix: hard coded restore resolution, TODO: get resolution from segm…
Browse files Browse the repository at this point in the history
…entation layer
  • Loading branch information
jinhan committed Mar 7, 2024
1 parent 6a05c32 commit 8d3a6c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {UserLayer, UserLayerConstructor, layerTypes} from "neuroglancer/layer";
import {Tool, restoreTool} from 'neuroglancer/ui/tool';
import {verifyObject, verifyObjectProperty, verifyString} from 'neuroglancer/util/json';
import {registerAnnotateCubeTool} from "./widgets/add_cube_annotation";
import {getLayerScales} from "./widgets/widget_utils.tx";
import {getLayerScales} from "./widgets/widget_utils";

declare var NEUROGLANCER_DEFAULT_STATE_FRAGMENT: string|undefined;

Expand Down
10 changes: 5 additions & 5 deletions src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ export const useLayersStore = defineStore('layers', () => {
if (!viewer) return;
viewer.layerSpecification.restoreState(layers);
viewer.navigationState.reset();
// viewer.coordinateSpace.restoreState({
// x: [8e-9, 'm'],
// y: [8e-9, 'm'],
// z: [33e-9, 'm'],
// });
viewer.coordinateSpace.restoreState({
x: [8e-9, 'm'],
y: [8e-9, 'm'],
z: [33e-9, 'm'],
});
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/add_cube_annotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {verifyOptionalObjectProperty} from "neuroglancer/util/json";
import {NullarySignal} from "neuroglancer/util/signal";
import {StatusMessage} from "neuroglancer/status";
import {AnnotationUserLayer} from "neuroglancer/annotation/user_layer";
import {getLayerScales} from "./widget_utils.tx";
import {getLayerScales} from "./widget_utils";

const ADD_CUBE_TOOL_ID = "annotateCustomCube";
const ADD_CUBE_EVENT_MAP = EventActionMap.fromObject({
Expand Down
File renamed without changes.

0 comments on commit 8d3a6c8

Please sign in to comment.