diff --git a/angular.json b/angular.json index dcbadb4911f1203a6204541cc20e00b2ec00947b..46d2ba12824d187f38aab94428da75566e9fccee 100644 --- a/angular.json +++ b/angular.json @@ -34,7 +34,13 @@ "styles": [ "src/theme.scss", "src/overwrite.scss", - "src/extra_styles.css" + "src/extra_styles.css", + + { + "input": "export-nehuba/dist/min/main.css", + "inject": false, + "bundleName": "vanillaMain" + } ], "scripts": [{ "input": "worker/worker.js", diff --git a/src/viewerModule/nehuba/nehubaViewer/nehubaViewer.component.ts b/src/viewerModule/nehuba/nehubaViewer/nehubaViewer.component.ts index 017187edb71c29fc59bc0dd589790a6dc3bb4e02..0bee1941f311aee0df808e66678299649bcc6128 100644 --- a/src/viewerModule/nehuba/nehubaViewer/nehubaViewer.component.ts +++ b/src/viewerModule/nehuba/nehubaViewer/nehubaViewer.component.ts @@ -505,7 +505,6 @@ export class NehubaViewerUnit implements OnDestroy { ...rest, ...(transform ? { transform } : {}) } - console.log(combined) viewer.layerManager.addManagedLayer( viewer.layerSpecification.getLayer(key, combined)) @@ -820,7 +819,14 @@ export class NehubaViewerUnit implements OnDestroy { */ } + /** + * n.b. 2 + * updating layer colormap seems to also mess up the position () + */ + const layersManager = this.nehubaViewer.ngviewer.state.children.get("layers") + const position = this.nehubaViewer.ngviewer.state.children.get("position") + const prevPos = position.toJSON() const layerJson = layersManager.toJSON() for (const layer of layerJson) { if (layer.name in mainDict) { @@ -828,6 +834,7 @@ export class NehubaViewerUnit implements OnDestroy { } } layersManager.restoreState(layerJson) + position.restoreState(prevPos) this.#triggerMeshLoad$.next(null) } } diff --git a/third_party/vanilla.html b/third_party/vanilla.html index be223e1e38ab861e649e4c4666e894d0a48c6f8c..5513962d41c1a6cb07e54a164e06a6bae15784f5 100644 --- a/third_party/vanilla.html +++ b/third_party/vanilla.html @@ -9,6 +9,7 @@ <script src="main.bundle.js"></script> <link rel="stylesheet" href="vanilla_styles.css"> <link rel="stylesheet" href="main.css"> + <link rel="stylesheet" href="vanillaMain.css"> </head> <body> <div id="neuroglancer-container"></div>