diff --git a/src/atlasViewer/atlasViewer.template.html b/src/atlasViewer/atlasViewer.template.html index 8561b2b623c34bdfeb299aaf9d345c431870758e..7e12fad60e5fbd3171ac3e7d3d986221f9fc32e0 100644 --- a/src/atlasViewer/atlasViewer.template.html +++ b/src/atlasViewer/atlasViewer.template.html @@ -7,9 +7,11 @@ <!-- kg tos --> <ng-template #kgToS> <h2 mat-dialog-title>Knowledge Graph ToS</h2> - <mat-dialog-content class="w-50vw"> - <kgtos-component> - </kgtos-component> + <mat-dialog-content> + <small> + <kgtos-component> + </kgtos-component> + </small> </mat-dialog-content> <mat-dialog-actions class="justify-content-end"> @@ -22,9 +24,11 @@ <!-- cookie --> <ng-template #cookieAgreementComponent> <h2 mat-dialog-title>Cookie Disclaimer</h2> - <mat-dialog-content class="w-50vw"> - <cookie-agreement> - </cookie-agreement> + <mat-dialog-content> + <small> + <cookie-agreement> + </cookie-agreement> + </small> </mat-dialog-content> <mat-dialog-actions class="justify-content-end"> @@ -149,7 +153,11 @@ <div floatingMouseContextualContainerDirective> - <div class="d-inline-block" iav-mouse-hover #iavMouseHoverConetxtualBlock="iavMouseHover" contextualBlock> + <div *ngIf="!ismobile" + class="d-inline-block" + iav-mouse-hover + #iavMouseHoverConetxtualBlock="iavMouseHover" + contextualBlock> <ng-container *ngFor="let labelText of iavMouseHoverConetxtualBlock.currentOnHoverObs$ | async | mouseOverTextPipe : selectedParcellation"> diff --git a/src/theme.scss b/src/theme.scss index e85cfdce26366235f96280ccae6f742f46218b35..2603ff81c7c0cd003777a057e40f570cc59ae9f6 100644 --- a/src/theme.scss +++ b/src/theme.scss @@ -19,3 +19,29 @@ $iv-dark-theme: mat-dark-theme($iv-dark-theme-primary, $iv-dark-theme-accent, { @include angular-material-theme($iv-dark-theme); } + +.iav-dialog-class +{ + + @media (min-width: 576px) { + + } + + // Medium devices (tablets, 768px and up) + @media (min-width: 768px) { + + max-width: 50vw!important; + } + + // Large devices (desktops, 992px and up) + @media (min-width: 992px) { + + max-width: 50vw!important; + } + + // Extra large devices (large desktops, 1200px and up) + @media (min-width: 1200px) { + + max-width: 50vw!important; + } +} diff --git a/src/ui/nehubaContainer/nehubaContainer.template.html b/src/ui/nehubaContainer/nehubaContainer.template.html index 3e827ac7dd6143fd7506c7decea0b2c7092d9292..57f43e43fd0445365348ff101f4753cb8080634e 100644 --- a/src/ui/nehubaContainer/nehubaContainer.template.html +++ b/src/ui/nehubaContainer/nehubaContainer.template.html @@ -1,7 +1,7 @@ <ng-template #container> </ng-template> -<ui-splashscreen iav-stop="mousedown mouseup touchstart touchmove touchend" (contextmenu)="$event.stopPropagation();" *ngIf="!viewerLoaded"> +<ui-splashscreen iav-stop="mousedown mouseup touchstart touchmove touchend" *ngIf="!viewerLoaded"> </ui-splashscreen> <!-- spatial landmarks overlay --> diff --git a/src/ui/nehubaContainer/splashScreen/splashScreen.template.html b/src/ui/nehubaContainer/splashScreen/splashScreen.template.html index 71a731611707b5b9139c20bdad4a511e46259065..90dfb6b6cba80c3c4979146bd7cef5826d7af42d 100644 --- a/src/ui/nehubaContainer/splashScreen/splashScreen.template.html +++ b/src/ui/nehubaContainer/splashScreen/splashScreen.template.html @@ -29,8 +29,8 @@ Parcellations available </mat-card-subtitle> <button - (mousedown)="$event.stopPropagation()" - (click)="$event.stopPropagation(); selectTemplateParcellation(template, parcellation)" + iav-stop="mousedown touchstart click" + (click)="selectTemplateParcellation(template, parcellation)" *ngFor="let parcellation of template.parcellations" mat-button color="primary"> diff --git a/src/ui/sharedModules/angularMaterial.module.ts b/src/ui/sharedModules/angularMaterial.module.ts index 3d2399feb928cbb29784c61219766f66e0fe4d89..0b02dfe49874d8b0f80575e4b418db810b5fb09c 100644 --- a/src/ui/sharedModules/angularMaterial.module.ts +++ b/src/ui/sharedModules/angularMaterial.module.ts @@ -21,14 +21,18 @@ import { MatExpansionModule, MatGridListModule, MatIconModule, - MatMenuModule - + MatMenuModule, + MAT_DIALOG_DEFAULT_OPTIONS, + MatDialogConfig } from '@angular/material'; import { ScrollingModule as ExperimentalScrollingModule } from '@angular/cdk-experimental/scrolling' import { NgModule } from '@angular/core'; import {DragDropModule} from "@angular/cdk/drag-drop"; + +const defaultDialogOption: MatDialogConfig = new MatDialogConfig() + @NgModule({ imports: [ MatButtonModule, @@ -84,5 +88,12 @@ import {DragDropModule} from "@angular/cdk/drag-drop"; MatMenuModule, ExperimentalScrollingModule ], + providers: [{ + provide: MAT_DIALOG_DEFAULT_OPTIONS, + useValue: { + ...defaultDialogOption, + panelClass: 'iav-dialog-class' + } + }] }) export class AngularMaterialModule { }