diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78d9a7e7b59248e5b280835a47c7860b579061e2..98ff32775c62db929d9bcd1087e89d60eaee393c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,38 +26,37 @@ jobs: if: always() runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - env: NODE_ENV: test steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 16.x uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node-version }} + node-version: 16.x - run: npm i - - run: npm run test-ci + - run: | + if [[ "$GITHUB_REF" = *hotfix* ]] + then + export BS_REST_URL=https://siibra-api-rc.apps.hbp.eu/v2_0 + echo 'export const environment = { "BS_REST_URL": "https://siibra-api-rc.apps.hbp.eu/v2_0" }' > src/environments/environment.common.ts + fi + npm run test-ci backend: if: always() runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] env: NODE_ENV: test steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 16.x uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node-version }} + node-version: 16.x - run: | cd deploy npm i diff --git a/deploy/package-lock.json b/deploy/package-lock.json index 1dac062d78f8ca3d5a23d9456457a913ceef919c..85a12542dc7b71eca0510d03a3d5ce1178f09567 100644 --- a/deploy/package-lock.json +++ b/deploy/package-lock.json @@ -10,9 +10,9 @@ "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" }, "@sindresorhus/is": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-1.2.0.tgz", - "integrity": "sha512-mwhXGkRV5dlvQc4EgPDxDxO6WuMBVymGFd1CA+2Y+z5dG9MNspoQ+AWjl/Ld1MnpCL8AKbosZlDVohqcIwuWsw==" + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==" }, "@sinonjs/commons": { "version": "1.7.0", @@ -924,25 +924,60 @@ } }, "got": { - "version": "10.5.5", - "resolved": "https://registry.npmjs.org/got/-/got-10.5.5.tgz", - "integrity": "sha512-B13HHkCkTA7KxyxTrFoZfrurBX1fZxjMTKpmIfoVzh0Xfs9aZV7xEfI6EKuERQOIPbomh5LE4xDkfK6o2VXksw==", + "version": "11.8.5", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", + "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", "requires": { - "@sindresorhus/is": "^1.0.0", - "@szmarczak/http-timer": "^4.0.0", + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", - "cacheable-lookup": "^2.0.0", - "cacheable-request": "^7.0.1", - "decompress-response": "^5.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^5.0.0", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", - "mimic-response": "^2.0.0", "p-cancelable": "^2.0.0", - "p-event": "^4.0.0", - "responselike": "^2.0.0", - "to-readable-stream": "^2.0.0", - "type-fest": "^0.9.0" + "responselike": "^2.0.0" + }, + "dependencies": { + "cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" + }, + "cacheable-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + } + }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "requires": { + "mimic-response": "^3.1.0" + } + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + } } }, "growl": { @@ -1571,9 +1606,9 @@ }, "dependencies": { "@sindresorhus/is": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.0.tgz", - "integrity": "sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ==" + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==" }, "cacheable-lookup": { "version": "5.0.4", @@ -1589,21 +1624,46 @@ } }, "got": { - "version": "11.8.2", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", - "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", + "version": "11.8.5", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", + "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", "requires": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.1", + "cacheable-request": "^7.0.2", "decompress-response": "^6.0.0", "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" + }, + "dependencies": { + "cacheable-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + } + }, + "http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "requires": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + } + } } }, "lru-cache": { @@ -1619,6 +1679,11 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -1917,9 +1982,9 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "resolve-alpn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.0.0.tgz", - "integrity": "sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" }, "responselike": { "version": "2.0.0", @@ -2229,11 +2294,6 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "type-fest": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.9.0.tgz", - "integrity": "sha512-j55pzONIdg7rdtJTRZPKIbV0FosUqYdhHK1aAYJIrUvejv1VVyBokrILE8KQDT4emW/1Ev9tx+yZG+AxuSBMmA==" - }, "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", diff --git a/deploy/package.json b/deploy/package.json index 333568cdfc0b2804ed97319a6b00dd1577c59d50..9470dcf3c16f707ecd0c023fcff17e3e843d2bc8 100644 --- a/deploy/package.json +++ b/deploy/package.json @@ -18,7 +18,7 @@ "express": "^4.16.4", "express-rate-limit": "^5.5.1", "express-session": "^1.15.6", - "got": "^10.5.5", + "got": "^11.8.5", "hbp-seafile": "^0.2.0", "helmet-csp": "^3.4.0", "lru-cache": "^5.1.1", diff --git a/docs/releases/v2.7.1.md b/docs/releases/v2.7.1.md new file mode 100644 index 0000000000000000000000000000000000000000..a2d967a9c06c5baa042653168ddded4bbf99c52f --- /dev/null +++ b/docs/releases/v2.7.1.md @@ -0,0 +1,5 @@ +# v2.7.1 + +## Bugfix + +- fixed region detail fetching using duplicated id as endpoint diff --git a/docs/releases/v2.7.2.md b/docs/releases/v2.7.2.md new file mode 100644 index 0000000000000000000000000000000000000000..7279c7cd29df3ca7cb8cca41418290209ab8c755 --- /dev/null +++ b/docs/releases/v2.7.2.md @@ -0,0 +1,10 @@ +# v2.7.2 + +## Feature + +- (re)introduced the parcellation info button + +## Bugfix + +- fix the position of quick tour panel of slice view panels +- fix the atlas selection logic. This should reduce 4xx/5xx calls significantly diff --git a/mkdocs.yml b/mkdocs.yml index cf6e2cb584ed320eac04af6ce43ceed9753165f0..4d705ac0aabaec7503bcfab2794f46ea6a27d83b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Interactive Atlas Viewer User Documentation +site_name: Siibra Explorer User Documentation theme: name: 'material' @@ -33,6 +33,8 @@ nav: - Fetching datasets: 'advanced/datasets.md' - Display non-atlas volumes: 'advanced/otherVolumes.md' - Release notes: + - v2.7.2: 'releases/v2.7.2.md' + - v2.7.1: 'releases/v2.7.1.md' - v2.7.0: 'releases/v2.7.0.md' - v2.6.10: 'releases/v2.6.10.md' - v2.6.9: 'releases/v2.6.9.md' diff --git a/package.json b/package.json index 8045a92ddfdc2c4b3ee43a83e590b11bf7cdf35a..82db76567fac6c5f0b472486c523ce38fa0b3a82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "interactive-viewer", - "version": "2.7.0", + "version": "2.7.2", "description": "siibra-explorer - explore brain atlases. Based on humanbrainproject/nehuba & google/neuroglancer. Built with angular", "scripts": { "lint": "eslint src --ext .ts", diff --git a/src/atlasComponents/sapi/core/sapiRegion.ts b/src/atlasComponents/sapi/core/sapiRegion.ts index 8248992c16ef86a1bbd6e28c395b8dd08db9d66f..d7b82c7d918d3e8209ead4d8033a6a4f12965605 100644 --- a/src/atlasComponents/sapi/core/sapiRegion.ts +++ b/src/atlasComponents/sapi/core/sapiRegion.ts @@ -94,7 +94,7 @@ export class SAPIRegion{ } getDetail(spaceId: string): Observable<SapiRegionModel> { - const url = `${this.prefix}/${encodeURIComponent(this.id)}` + const url = `${this.prefix}` return this.sapi.httpGet<SapiRegionModel>( url, { diff --git a/src/atlasComponents/sapi/sapi.service.ts b/src/atlasComponents/sapi/sapi.service.ts index 62ba0e2528a8633db52bc44acdcadd3e9e851e04..0600ef2978744509aacbd555e1ae9c5472df89ec 100644 --- a/src/atlasComponents/sapi/sapi.service.ts +++ b/src/atlasComponents/sapi/sapi.service.ts @@ -24,7 +24,7 @@ import { SAPIFeature } from "./features"; import { environment } from "src/environments/environment" export const SIIBRA_API_VERSION_HEADER_KEY='x-siibra-api-version' -export const SIIBRA_API_VERSION = '0.2.0' +export const SIIBRA_API_VERSION = '0.2.1' type RegistryType = SAPIAtlas | SAPISpace | SAPIParcellation diff --git a/src/atlasComponents/sapiViews/core/parcellation/module.ts b/src/atlasComponents/sapiViews/core/parcellation/module.ts index cb7581d2d88ab9f43518261e87a515b8ceb99456..91133d0c156a173c9b9ccf063c2e69094bfee3fc 100644 --- a/src/atlasComponents/sapiViews/core/parcellation/module.ts +++ b/src/atlasComponents/sapiViews/core/parcellation/module.ts @@ -4,11 +4,13 @@ import { Store } from "@ngrx/store"; import { ComponentsModule } from "src/components"; import { AngularMaterialModule } from "src/sharedModules"; import { atlasAppearance } from "src/state"; +import { DialogModule } from "src/ui/dialogInfo/module"; import { UtilModule } from "src/util"; import { SapiViewsUtilModule } from "../../util"; import { SapiViewsCoreParcellationParcellationChip } from "./chip/parcellation.chip.component"; import { FilterGroupedParcellationPipe } from "./filterGroupedParcellations.pipe"; import { FilterUnsupportedParcPipe } from "./filterUnsupportedParc.pipe"; +import { ParcellationDoiPipe } from "./parcellationDoi.pipe"; import { ParcellationIsBaseLayer } from "./parcellationIsBaseLayer.pipe"; import { ParcellationVisibilityService } from "./parcellationVis.service"; import { PreviewParcellationUrlPipe } from "./previewParcellationUrl.pipe"; @@ -22,6 +24,7 @@ import { SapiViewsCoreParcellationParcellationTile } from "./tile/parcellation.t AngularMaterialModule, UtilModule, SapiViewsUtilModule, + DialogModule, ], declarations: [ SapiViewsCoreParcellationParcellationTile, @@ -31,6 +34,7 @@ import { SapiViewsCoreParcellationParcellationTile } from "./tile/parcellation.t FilterGroupedParcellationPipe, FilterUnsupportedParcPipe, ParcellationIsBaseLayer, + ParcellationDoiPipe, ], exports: [ SapiViewsCoreParcellationParcellationTile, diff --git a/src/atlasComponents/sapiViews/core/parcellation/parcellationDoi.pipe.ts b/src/atlasComponents/sapiViews/core/parcellation/parcellationDoi.pipe.ts new file mode 100644 index 0000000000000000000000000000000000000000..8652365e1bb40d6565ccfd9d88e30eb94492c6d4 --- /dev/null +++ b/src/atlasComponents/sapiViews/core/parcellation/parcellationDoi.pipe.ts @@ -0,0 +1,18 @@ +import { Pipe, PipeTransform } from "@angular/core"; +import { SapiParcellationModel } from "src/atlasComponents/sapi/type"; + +@Pipe({ + name: 'parcellationDoiPipe', + pure: true +}) + +export class ParcellationDoiPipe implements PipeTransform { + public transform(parc: SapiParcellationModel): string[] { + const urls = (parc?.brainAtlasVersions || []).filter( + v => v.digitalIdentifier && v.digitalIdentifier['@type'] === 'https://openminds.ebrains.eu/core/DOI' + ).map( + v => v.digitalIdentifier['@id'] as string + ) + return Array.from(new Set(urls)) + } +} diff --git a/src/atlasComponents/sapiViews/core/parcellation/parcellationVersion.pipe.spec.ts b/src/atlasComponents/sapiViews/core/parcellation/parcellationVersion.pipe.spec.ts index 5a7eb1fc32405cd1a4f9128cfda54c018eb45766..77df043bb37ed7ffb87cad72d422dda777db33d0 100644 --- a/src/atlasComponents/sapiViews/core/parcellation/parcellationVersion.pipe.spec.ts +++ b/src/atlasComponents/sapiViews/core/parcellation/parcellationVersion.pipe.spec.ts @@ -3,7 +3,7 @@ import { SAPI } from "src/atlasComponents/sapi/sapi.service" import { SapiParcellationModel } from "src/atlasComponents/sapi/type" import { getTraverseFunctions } from "./parcellationVersion.pipe" -describe("parcellationVersion.pipe.ts", () => { +describe(`parcellationVersion.pipe.ts (endpoint at ${SAPI.bsEndpoint})`, () => { describe("getTraverseFunctions", () => { let julichBrainParcellations: SapiParcellationModel[] = [] beforeAll(async () => { diff --git a/src/atlasComponents/sapiViews/core/parcellation/smartChip/parcellation.smartChip.template.html b/src/atlasComponents/sapiViews/core/parcellation/smartChip/parcellation.smartChip.template.html index e56b6b69b9fc9405c4efb29900f9a448921839cf..29c269adce83878e8bb3e36e0ae666dbf0fcf54b 100644 --- a/src/atlasComponents/sapiViews/core/parcellation/smartChip/parcellation.smartChip.template.html +++ b/src/atlasComponents/sapiViews/core/parcellation/smartChip/parcellation.smartChip.template.html @@ -18,6 +18,22 @@ [sxplr-sapiviews-core-parcellation-chip-color]="(parcellation | equality : parc : trackByFn) ? 'primary' : 'default'" (sxplr-sapiviews-core-parcellation-chip-onclick)="selectParcellation(parc)"> + <div class="sxplr-scale-70" + suffix + iav-stop="mousedown click"> + + <ng-template #otherParcDesc> + <ng-template [ngTemplateOutlet]="parcDescTmpl" + [ngTemplateOutletContext]="{ parcellation: parc }"> + </ng-template> + </ng-template> + + <button mat-mini-fab color="default" + [sxplr-dialog]="otherParcDesc" + [sxplr-dialog-size]="null"> + <i class="fas fa-info"></i> + </button> + </div> </sxplr-sapiviews-core-parcellation-chip> <div class="spinner-container" *ngIf="(loadingParc$ | async) === parc"> @@ -60,12 +76,24 @@ </button> </div> - <div *ngIf="!(parcellation | parcellationIsBaseLayer)" - class="sxplr-scale-70" - suffix> + <div class="sxplr-scale-70" + suffix + iav-stop="mousedown click"> + + <ng-template #mainParcDesc> + <ng-template [ngTemplateOutlet]="parcDescTmpl" + [ngTemplateOutletContext]="{ parcellation: parcellation }"> + </ng-template> + </ng-template> + + <button mat-mini-fab color="default" + [sxplr-dialog]="mainParcDesc" + [sxplr-dialog-size]="null"> + <i class="fas fa-info"></i> + </button> <button mat-mini-fab + *ngIf="!(parcellation | parcellationIsBaseLayer)" color="primary" - iav-stop="mousedown click" (click)="dismiss()"> <spinner-cmp class="sxplr-w-100 sxplr-h-100" *ngIf="onDismissClicked$ | async; else defaultDismissIcon"></spinner-cmp> @@ -76,3 +104,32 @@ </button> </div> </sxplr-sapiviews-core-parcellation-chip> + +<!-- parcellation description template --> + +<ng-template #parcDescTmpl let-parc="parcellation"> + <h1 mat-dialog-title> + {{ parc.name }} + </h1> + <div mat-dialog-content> + <markdown-dom + *ngIf="parc.brainAtlasVersions.length > 0 && parc.brainAtlasVersions[0].versionInnovation" + [markdown]="parc.brainAtlasVersions[0].versionInnovation"> + </markdown-dom> + </div> + + <mat-dialog-actions align="start"> + <a *ngFor="let url of parc | parcellationDoiPipe" + [href]="url" + target="_blank" + mat-raised-button + color="primary"> + <div class="fas fa-external-link-alt"></div> + <span> + Explore + </span> + </a> + + <button mat-button mat-dialog-close>Close</button> + </mat-dialog-actions> +</ng-template> diff --git a/src/atlasComponents/sapiViews/util/parcellationSupportedInSpace.pipe.ts b/src/atlasComponents/sapiViews/util/parcellationSupportedInSpace.pipe.ts index f16e6a0a82d991ca8955e84f9ed4a15fe14e2ab4..42eec193e93fcd29dcf576c45135bf0b0f892eef 100644 --- a/src/atlasComponents/sapiViews/util/parcellationSupportedInSpace.pipe.ts +++ b/src/atlasComponents/sapiViews/util/parcellationSupportedInSpace.pipe.ts @@ -1,5 +1,5 @@ import { Pipe, PipeTransform } from "@angular/core"; -import { Observable, of } from "rxjs"; +import { NEVER, Observable, of } from "rxjs"; import { map } from "rxjs/operators"; import { SAPIParcellation } from "src/atlasComponents/sapi/core"; import { SAPI } from "src/atlasComponents/sapi/sapi.service"; @@ -29,6 +29,7 @@ export class ParcellationSupportedInSpacePipe implements PipeTransform{ constructor(private sapi: SAPI){} public transform(parc: SapiParcellationModel|string, tmpl: SapiSpaceModel|string): Observable<boolean> { + if (!parc) return NEVER const parcId = typeof parc === "string" ? parc : parc["@id"] diff --git a/src/overwrite.scss b/src/overwrite.scss index 790e436d35acc4e970127548ec060fa796b6a650..b1e3e9f6aa4fc9289fb7e23bb1bbb41d3b3f0a60 100644 --- a/src/overwrite.scss +++ b/src/overwrite.scss @@ -279,3 +279,8 @@ $flex-directions: row,column; opacity: 0.5; } } + +a[mat-raised-button] +{ + text-decoration: none; +} diff --git a/src/state/atlasSelection/store.ts b/src/state/atlasSelection/store.ts index 08848c1efa9b81e649bfc8d7c29d3cc6581f77ed..ebea8a78dd3015d9b0b050c3902e40fb8ab2a0c8 100644 --- a/src/state/atlasSelection/store.ts +++ b/src/state/atlasSelection/store.ts @@ -117,9 +117,14 @@ const reducer = createReducer( on( actions.selectAtlas, (state, { atlas }) => { + if (atlas?.["@id"] === state?.selectedAtlas?.["@id"]) { + return state + } return { ...state, - selectedAtlas: atlas + selectedAtlas: atlas, + selectedTemplate: null, + selectedParcellation: null, } } ), diff --git a/src/ui/dialogInfo/dialog.directive.ts b/src/ui/dialogInfo/dialog.directive.ts index 1b30c4e59ede96787318fe0f8582a2ee85317072..63d886a6ef5fa172ea1a8cf17abb5587005a5751 100644 --- a/src/ui/dialogInfo/dialog.directive.ts +++ b/src/ui/dialogInfo/dialog.directive.ts @@ -52,7 +52,7 @@ export class DialogDirective{ } this.matDialog.open(this.templateRef, { data: this.data, - ...sizeDict[this.size] + ...(sizeDict[this.size] || {}) }) } } \ No newline at end of file diff --git a/src/viewerModule/nehuba/layoutOverlay/nehuba.layoutOverlay/nehuba.layoutOverlay.component.ts b/src/viewerModule/nehuba/layoutOverlay/nehuba.layoutOverlay/nehuba.layoutOverlay.component.ts index 93af83e0d5f39e69334043acd31657aa18231e11..2fcf3b824328773660a44e725872f1aafd36dfd5 100644 --- a/src/viewerModule/nehuba/layoutOverlay/nehuba.layoutOverlay/nehuba.layoutOverlay.component.ts +++ b/src/viewerModule/nehuba/layoutOverlay/nehuba.layoutOverlay/nehuba.layoutOverlay.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, ChangeDetectorRef, Component, Inject, OnDestroy } from "@angular/core"; +import { ChangeDetectorRef, Component, Inject, OnDestroy } from "@angular/core"; import { select, Store } from "@ngrx/store"; import { combineLatest, fromEvent, interval, merge, Observable, of, Subject, Subscription } from "rxjs"; import { userInterface } from "src/state"; @@ -16,7 +16,7 @@ import { debounce, debounceTime, distinctUntilChanged, filter, map, mapTo, switc ] }) -export class NehubaLayoutOverlay implements OnDestroy, AfterViewInit{ +export class NehubaLayoutOverlay implements OnDestroy{ public ARIA_LABELS = ARIA_LABELS public IDS = IDS @@ -44,10 +44,6 @@ export class NehubaLayoutOverlay implements OnDestroy, AfterViewInit{ while(this.nehubaUnitSubs.length > 0) this.nehubaUnitSubs.pop().unsubscribe() } - ngAfterViewInit(): void { - this.setQuickTourPos() - } - handleCycleViewEvent(): void { if (this.currentPanelMode !== "SINGLE_PANEL") return this.store$.dispatch( @@ -124,6 +120,7 @@ export class NehubaLayoutOverlay implements OnDestroy, AfterViewInit{ nehuba$.subscribe(nehuba => { this.nehubaUnit = nehuba this.onNewNehubaUnit(nehuba) + this.setQuickTourPos() }) ) }