Skip to content
Snippets Groups Projects
Commit cd4026cb authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: ios/safari volumetric viewer

parent 6ebb7cc2
No related branches found
No related tags found
No related merge requests found
# v2.14.7
## Bugfix
- fixed issue on iOS/Safari volumetric viewer not displaying. (update called before config was populated).
## Behind the Scenes
- Minor refactor to remove unneeded code.
\ No newline at end of file
...@@ -45,6 +45,7 @@ nav: ...@@ -45,6 +45,7 @@ nav:
- Differential gene expression analysis: "advanced/differential_gene_expression_analysis.md" - Differential gene expression analysis: "advanced/differential_gene_expression_analysis.md"
- Release notes: - Release notes:
- v2.14.7: 'releases/v2.14.7.md'
- v2.14.6: 'releases/v2.14.6.md' - v2.14.6: 'releases/v2.14.6.md'
- v2.14.5: 'releases/v2.14.5.md' - v2.14.5: 'releases/v2.14.5.md'
- v2.14.4: 'releases/v2.14.4.md' - v2.14.4: 'releases/v2.14.4.md'
......
{ {
"name": "siibra-explorer", "name": "siibra-explorer",
"version": "2.14.5", "version": "2.14.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "siibra-explorer", "name": "siibra-explorer",
"version": "2.14.5", "version": "2.14.6",
"license": "apache-2.0", "license": "apache-2.0",
"dependencies": { "dependencies": {
"@angular/animations": "^15.2.10", "@angular/animations": "^15.2.10",
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"@ngrx/effects": "^15.4.0", "@ngrx/effects": "^15.4.0",
"@ngrx/store": "^15.4.0", "@ngrx/store": "^15.4.0",
"acorn": "^8.4.1", "acorn": "^8.4.1",
"export-nehuba": "^0.1.8", "export-nehuba": "^0.1.9",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"jszip": "^3.6.0", "jszip": "^3.6.0",
"postcss": "^8.3.6", "postcss": "^8.3.6",
...@@ -7646,9 +7646,9 @@ ...@@ -7646,9 +7646,9 @@
"dev": true "dev": true
}, },
"node_modules/export-nehuba": { "node_modules/export-nehuba": {
"version": "0.1.8", "version": "0.1.9",
"resolved": "https://registry.npmjs.org/export-nehuba/-/export-nehuba-0.1.8.tgz", "resolved": "https://registry.npmjs.org/export-nehuba/-/export-nehuba-0.1.9.tgz",
"integrity": "sha512-A5RijEUDqhv09yAOeVb2AxS36YmJNyWXRmcImPFSGgLq9bP8bcjrHIbmBOsEX9ntAKwwaHNvlVVmDSwHnGqFug==", "integrity": "sha512-59vm+BlB1zuD2ftDWUGUv6Jt0WGHjzB6egGGuD+JRR9oW4D7m9DNuOwheymSvlUxJ2GEOjMBe3I460T51m6W/A==",
"dependencies": { "dependencies": {
"pako": "^1.0.6" "pako": "^1.0.6"
} }
......
{ {
"name": "siibra-explorer", "name": "siibra-explorer",
"version": "2.14.6", "version": "2.14.7",
"description": "siibra-explorer - explore brain atlases. Based on humanbrainproject/nehuba & google/neuroglancer. Built with angular", "description": "siibra-explorer - explore brain atlases. Based on humanbrainproject/nehuba & google/neuroglancer. Built with angular",
"scripts": { "scripts": {
"lint": "eslint src --ext .ts", "lint": "eslint src --ext .ts",
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
"@ngrx/effects": "^15.4.0", "@ngrx/effects": "^15.4.0",
"@ngrx/store": "^15.4.0", "@ngrx/store": "^15.4.0",
"acorn": "^8.4.1", "acorn": "^8.4.1",
"export-nehuba": "^0.1.8", "export-nehuba": "^0.1.9",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"jszip": "^3.6.0", "jszip": "^3.6.0",
"postcss": "^8.3.6", "postcss": "^8.3.6",
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<script type="module" src="https://unpkg.com/ng-layer-tune@0.0.26/dist/ng-layer-tune/ng-layer-tune.esm.js"></script> <script type="module" src="https://unpkg.com/ng-layer-tune@0.0.26/dist/ng-layer-tune/ng-layer-tune.esm.js"></script>
<script type="module" src="https://unpkg.com/hbp-connectivity-component@0.6.6/dist/connectivity-component/connectivity-component.js" ></script> <script type="module" src="https://unpkg.com/hbp-connectivity-component@0.6.6/dist/connectivity-component/connectivity-component.js" ></script>
<script src="https://cdn.plot.ly/plotly-2.24.1.min.js" charset="utf-8"></script> <script src="https://cdn.plot.ly/plotly-2.24.1.min.js" charset="utf-8"></script>
<script src="main.bundle.js" charset="utf-8"></script> <!-- export_nehuba -->
<title>Siibra Explorer</title> <title>Siibra Explorer</title>
</head> </head>
<body> <body>
......
...@@ -9,8 +9,6 @@ import { UtilModule } from "src/util"; ...@@ -9,8 +9,6 @@ import { UtilModule } from "src/util";
import { ShareModule } from "src/share"; import { ShareModule } from "src/share";
import { AuthModule } from "src/auth"; import { AuthModule } from "src/auth";
import { ActionDialog } from "./actionDialog/actionDialog.component"; import { ActionDialog } from "./actionDialog/actionDialog.component";
import { APPEND_SCRIPT_TOKEN, appendScriptFactory } from "src/util/constants";
import { DOCUMENT } from "@angular/common";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { HANDLE_SCREENSHOT_PROMISE, TypeHandleScrnShotPromise } from "../screenshot"; import { HANDLE_SCREENSHOT_PROMISE, TypeHandleScrnShotPromise } from "../screenshot";
...@@ -32,11 +30,6 @@ import { HANDLE_SCREENSHOT_PROMISE, TypeHandleScrnShotPromise } from "../screens ...@@ -32,11 +30,6 @@ import { HANDLE_SCREENSHOT_PROMISE, TypeHandleScrnShotPromise } from "../screens
ActionDialog, ActionDialog,
], ],
providers: [ providers: [
{
provide: APPEND_SCRIPT_TOKEN,
useFactory: appendScriptFactory,
deps: [DOCUMENT]
},
{ {
provide: HANDLE_SCREENSHOT_PROMISE, provide: HANDLE_SCREENSHOT_PROMISE,
useValue: ((param) => { useValue: ((param) => {
......
import { APP_INITIALIZER, NgModule } from "@angular/core"; import { APP_INITIALIZER, NgModule } from "@angular/core";
import { NehubaViewerContainerDirective } from './nehubaViewerInterface/nehubaViewerInterface.directive' import { NehubaViewerContainerDirective } from './nehubaViewerInterface/nehubaViewerInterface.directive'
import { IMPORT_NEHUBA_INJECT_TOKEN, NehubaViewerUnit } from "./nehubaViewer/nehubaViewer.component"; import { NehubaViewerUnit } from "./nehubaViewer/nehubaViewer.component";
import { CommonModule } from "@angular/common"; import { CommonModule } from "@angular/common";
import { APPEND_SCRIPT_TOKEN } from "src/util/constants"; import { NEHUBA_INSTANCE_INJTKN } from "./util";
import { importNehubaFactory, NEHUBA_INSTANCE_INJTKN } from "./util";
import { NehubaViewerTouchDirective } from "./nehubaViewerInterface/nehubaViewerTouch.directive"; import { NehubaViewerTouchDirective } from "./nehubaViewerInterface/nehubaViewerTouch.directive";
import { StoreModule } from "@ngrx/store"; import { StoreModule } from "@ngrx/store";
import { NEHUBA_VIEWER_FEATURE_KEY } from "./constants"; import { NEHUBA_VIEWER_FEATURE_KEY } from "./constants";
...@@ -18,7 +17,7 @@ import { FormsModule, ReactiveFormsModule } from "@angular/forms"; ...@@ -18,7 +17,7 @@ import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { BehaviorSubject } from "rxjs"; import { BehaviorSubject } from "rxjs";
import { StateModule } from "src/state"; import { StateModule } from "src/state";
import { AuthModule } from "src/auth"; import { AuthModule } from "src/auth";
import {QuickTourModule} from "src/ui/quickTour/module"; import { QuickTourModule } from "src/ui/quickTour/module";
import { WindowResizeModule } from "src/util/windowResize"; import { WindowResizeModule } from "src/util/windowResize";
import { EffectsModule } from "@ngrx/effects"; import { EffectsModule } from "@ngrx/effects";
import { MeshEffects } from "./mesh.effects/mesh.effects"; import { MeshEffects } from "./mesh.effects/mesh.effects";
...@@ -81,12 +80,6 @@ import { MediaQueryDirective } from "src/util/directives/mediaQuery.directive"; ...@@ -81,12 +80,6 @@ import { MediaQueryDirective } from "src/util/directives/mediaQuery.directive";
StatusCardComponent, StatusCardComponent,
], ],
providers: [ providers: [
{
provide: IMPORT_NEHUBA_INJECT_TOKEN,
useFactory: importNehubaFactory,
deps: [ APPEND_SCRIPT_TOKEN ]
},
{ {
provide: NEHUBA_INSTANCE_INJTKN, provide: NEHUBA_INSTANCE_INJTKN,
useValue: new BehaviorSubject(null) useValue: new BehaviorSubject(null)
......
import { TestBed, fakeAsync, tick, ComponentFixture } from "@angular/core/testing" import { TestBed, fakeAsync, tick, ComponentFixture } from "@angular/core/testing"
import { CommonModule } from "@angular/common" import { CommonModule } from "@angular/common"
import { NehubaViewerUnit, IMPORT_NEHUBA_INJECT_TOKEN, scanFn } from "./nehubaViewer.component" import { NehubaViewerUnit, scanFn } from "./nehubaViewer.component"
import { LoggingModule, LoggingService } from "src/logging" import { LoggingModule, LoggingService } from "src/logging"
import { IMeshesToLoad, SET_MESHES_TO_LOAD } from "../constants" import { IMeshesToLoad, SET_MESHES_TO_LOAD } from "../constants"
import { Subject } from "rxjs" import { Subject } from "rxjs"
...@@ -90,10 +90,6 @@ describe('> nehubaViewer.component.ts', () => { ...@@ -90,10 +90,6 @@ describe('> nehubaViewer.component.ts', () => {
NehubaViewerUnit NehubaViewerUnit
], ],
providers:[ providers:[
{
provide: IMPORT_NEHUBA_INJECT_TOKEN,
useValue: () => Promise.resolve(),
},
{ {
provide: SET_MESHES_TO_LOAD, provide: SET_MESHES_TO_LOAD,
useFactory: () => setMeshToLoadCtl$ useFactory: () => setMeshToLoadCtl$
......
...@@ -24,7 +24,6 @@ function translateUnit(unit: Unit) { ...@@ -24,7 +24,6 @@ function translateUnit(unit: Unit) {
throw new Error(`Cannot translate unit: ${unit}`) throw new Error(`Cannot translate unit: ${unit}`)
} }
export const IMPORT_NEHUBA_INJECT_TOKEN = `IMPORT_NEHUBA_INJECT_TOKEN`
interface LayerLabelIndex { interface LayerLabelIndex {
layer: { layer: {
...@@ -123,7 +122,6 @@ export class NehubaViewerUnit implements OnDestroy { ...@@ -123,7 +122,6 @@ export class NehubaViewerUnit implements OnDestroy {
public elementRef: ElementRef, public elementRef: ElementRef,
private log: LoggingService, private log: LoggingService,
private periodicSvc: PeriodicSvc, private periodicSvc: PeriodicSvc,
@Inject(IMPORT_NEHUBA_INJECT_TOKEN) getImportNehubaPr: () => Promise<any>,
@Optional() @Inject(NEHUBA_INSTANCE_INJTKN) private nehubaViewer$: Subject<NehubaViewerUnit>, @Optional() @Inject(NEHUBA_INSTANCE_INJTKN) private nehubaViewer$: Subject<NehubaViewerUnit>,
@Optional() @Inject(SET_MESHES_TO_LOAD) private injSetMeshesToLoad$: Observable<IMeshesToLoad>, @Optional() @Inject(SET_MESHES_TO_LOAD) private injSetMeshesToLoad$: Observable<IMeshesToLoad>,
@Optional() @Inject(SET_COLORMAP_OBS) private setColormap$: Observable<IColorMap>, @Optional() @Inject(SET_COLORMAP_OBS) private setColormap$: Observable<IColorMap>,
...@@ -194,8 +192,7 @@ export class NehubaViewerUnit implements OnDestroy { ...@@ -194,8 +192,7 @@ export class NehubaViewerUnit implements OnDestroy {
this.nehubaViewer$.next(this) this.nehubaViewer$.next(this)
} }
getImportNehubaPr() getExportNehuba()
.then(() => getExportNehuba())
.then(exportNehuba => { .then(exportNehuba => {
this.nehubaLoaded = true this.nehubaLoaded = true
this.exportNehuba = exportNehuba this.exportNehuba = exportNehuba
...@@ -417,9 +414,7 @@ export class NehubaViewerUnit implements OnDestroy { ...@@ -417,9 +414,7 @@ export class NehubaViewerUnit implements OnDestroy {
this.log.error(err) this.log.error(err)
}); });
(window as any).nehubaViewer = this.nehubaViewer const viewer = this.nehubaViewer.ngviewer
const viewer = window['viewer']
/** /**
* Hide all layers except the base layer (template) * Hide all layers except the base layer (template)
......
...@@ -178,18 +178,6 @@ export const isIdentityQuat = (ori: number[]): boolean => Math.abs(ori[0]) < 1e- ...@@ -178,18 +178,6 @@ export const isIdentityQuat = (ori: number[]): boolean => Math.abs(ori[0]) < 1e-
&& Math.abs(ori[2]) < 1e-6 && Math.abs(ori[2]) < 1e-6
&& Math.abs(ori[3] - 1) < 1e-6 && Math.abs(ori[3] - 1) < 1e-6
export const importNehubaFactory = (appendSrc: (src: string) => Promise<void>): () => Promise<void> => {
let pr: Promise<void>
return async () => {
if (!!(window as any).export_nehuba) return
if (pr) return pr
pr = appendSrc('main.bundle.js')
return pr
}
}
export const takeOnePipe = () => { export const takeOnePipe = () => {
return pipe( return pipe(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment