From 2ec0b8218e7bad169a8a60ae359035dc36c4959d Mon Sep 17 00:00:00 2001 From: Wieland Lindenthal Date: Mon, 24 Feb 2020 10:30:15 +0100 Subject: [PATCH] Don't block whole screen when loading models Update Xeokit viewer to 1.6.8 and SDK to 0.9.0 --- frontend/npm-shrinkwrap.json | 14 +++++++------- frontend/package.json | 4 ++-- .../ifc_models/ifc-viewer/ifc-viewer.component.ts | 4 ++-- .../stylesheets/bim/ifc_viewer/loading_modal.sass | 8 +++++--- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/frontend/npm-shrinkwrap.json b/frontend/npm-shrinkwrap.json index 55ec14db86..47eb8b75d4 100644 --- a/frontend/npm-shrinkwrap.json +++ b/frontend/npm-shrinkwrap.json @@ -3353,16 +3353,16 @@ } }, "@xeokit/xeokit-sdk": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@xeokit/xeokit-sdk/-/xeokit-sdk-0.8.8.tgz", - "integrity": "sha512-e+HTZajykFolCeWm5CIT7HSzOYoRhCxbecpjsXlmfEUYeFZ2Rpxc8CbI/vo62DjwobjFOB/dtyz3xJ2uWkogGg==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@xeokit/xeokit-sdk/-/xeokit-sdk-0.9.0.tgz", + "integrity": "sha512-DfsKm0gQabVemBp6wEa2I0g370bI58wZxA0I6Bv2DhyXlg0VrvAT/Uw8yDUmM76oqbs3NGmxfY0Nv7KcewtQqQ==" }, "@xeokit/xeokit-viewer": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@xeokit/xeokit-viewer/-/xeokit-viewer-1.6.4.tgz", - "integrity": "sha512-HgY9ceC+Nb6pBxCKlpcQo7cQearilXyVjPI9u5r27ZtHxkm1JDaAVInrDUTsFcpOyL2JBE17Xyb5kfzv9/FujQ==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@xeokit/xeokit-viewer/-/xeokit-viewer-1.6.8.tgz", + "integrity": "sha512-+iVX3U3yG8vWtoJ2Icj1cMWhk+A3CbJLlY4SmPt2irn9My1dYUOclK0x7rQ9SXx7FGgEglZ3jTQ3/SnBbP+OLw==", "requires": { - "@xeokit/xeokit-sdk": "^0.8.8" + "@xeokit/xeokit-sdk": "^0.9.0" } }, "@xtuc/ieee754": { diff --git a/frontend/package.json b/frontend/package.json index 74cf06eece..fed2f920ca 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -71,8 +71,8 @@ "@uirouter/core": "^6.0.4", "@uirouter/rx": "^0.6.5", "@w11k/ngx-componentdestroyed": "^5.0.2", - "@xeokit/xeokit-sdk": "^0.8.8", - "@xeokit/xeokit-viewer": "^1.6.4", + "@xeokit/xeokit-sdk": "^0.9.3", + "@xeokit/xeokit-viewer": "^1.6.9", "amdefine": "^1.0.0", "angular-dragula": "^1.2.8", "atoa": "^1.0.0", diff --git a/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts b/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts index d173f4695f..32a79d2da1 100644 --- a/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts @@ -33,7 +33,7 @@ import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-v @Component({ selector: 'ifc-viewer', template: ` -
+
@@ -59,7 +59,7 @@ export class IFCViewerComponent implements OnInit, OnDestroy { explorerElement: jQuery(".ifc-model-viewer--tree-panel")[0], // Left panel toolbarElement: element.find(".ifc-model-viewer--toolbar-container")[0], // Toolbar navCubeCanvasElement: element.find(".ifc-model-viewer--nav-cube-canvas")[0], - sectionPlanesOverviewCanvasElement: element.find(".ifc-model-viewer--section-planes-overview-canvas")[0] + busyModelBackdropElement: document.querySelector(".xeokit-busy-modal-backdrop") }, this.Gon.get('ifc_models', 'projects') as any[] ); diff --git a/modules/bim/app/assets/stylesheets/bim/ifc_viewer/loading_modal.sass b/modules/bim/app/assets/stylesheets/bim/ifc_viewer/loading_modal.sass index c3e70afc45..91224754d8 100644 --- a/modules/bim/app/assets/stylesheets/bim/ifc_viewer/loading_modal.sass +++ b/modules/bim/app/assets/stylesheets/bim/ifc_viewer/loading_modal.sass @@ -1,14 +1,16 @@ +.xeokit-busy-modal-backdrop + position: relative + .xeokit-busy-modal display: none - position: fixed + position: absolute + z-index: 1000000 padding-top: 100px left: 0 top: 0 width: 100% height: 100% - overflow: auto background-color: rgba(0, 0, 0, 0.4) - z-index: 30 // OpenProject special .xeokit-busy-modal-content position: relative