From 3ba37afe153ee15d7a27eafff5fb9afe7ac66fdc Mon Sep 17 00:00:00 2001 From: yanzexuan Date: Tue, 27 Jun 2023 13:12:18 +0800 Subject: [PATCH] Upgrade gemini-viewer sdk --- public/config.json | 5 +- public/demo/compare/dxfComparePanel.js | 4 +- public/demo/dxf_10.html | 2 +- public/demo/dxf_3.html | 18 ++-- public/demo/dxf_4.html | 142 ------------------------- public/demo/dxf_8.html | 2 +- 6 files changed, 14 insertions(+), 159 deletions(-) delete mode 100644 public/demo/dxf_4.html diff --git a/public/config.json b/public/config.json index ebacf54..89cf80c 100644 --- a/public/config.json +++ b/public/config.json @@ -28,14 +28,11 @@ "title": "Doors & windows", "url": "./demo/dxf_2.html" }, { - "title": "Drawing comparison", + "title": "Drawing comparison with 1 viewport", "url": "./demo/dxf_3.html" }, { "title": "Drawing comparison with 2 viewports", "url": "./demo/dxf_8.html" - }, { - "title": "Drawing comparison with 3 viewports", - "url": "./demo/dxf_4.html" }, { "title": "Upload files and compare with 2 viewports", "url": "./demo/dxf_10.html" diff --git a/public/demo/compare/dxfComparePanel.js b/public/demo/compare/dxfComparePanel.js index 47de732..481007b 100644 --- a/public/demo/compare/dxfComparePanel.js +++ b/public/demo/compare/dxfComparePanel.js @@ -29,7 +29,7 @@ export default class DxfComparePanel { panelContainer.appendChild(compareDetail); this.compareDetail = compareDetail; - const changes = this.viewer.getCompareChanges(); + const changes = this.viewer.getChanges(); if (!changes) { return; } @@ -98,7 +98,7 @@ export default class DxfComparePanel { lists.forEach((list) => { list.addEventListener("click", (e) => { if (e.target.tagName.toUpperCase() === "LI" && e.target.dataset.id) { - this.viewer.zoomToCompareChange(e.target.dataset.id); + this.viewer.zoomToChange(e.target.dataset.id); } }); }); diff --git a/public/demo/dxf_10.html b/public/demo/dxf_10.html index 3219327..276d760 100644 --- a/public/demo/dxf_10.html +++ b/public/demo/dxf_10.html @@ -102,7 +102,7 @@ const fontFiles = ["./demo/three/fonts/hztxt.shx", "./demo/three/fonts/simplex.shx"]; await compareHelper.setFont(fontFiles); - compareHelper.viewer1.toolbar.updateMenus( + compareHelper.viewer.toolbar.updateMenus( overrideToolbarConfig(compareHelper.viewer1) ); compareHelper.viewer2.toolbar.updateMenus( diff --git a/public/demo/dxf_3.html b/public/demo/dxf_3.html index 69e941c..84c554e 100644 --- a/public/demo/dxf_3.html +++ b/public/demo/dxf_3.html @@ -20,7 +20,7 @@
- - - \ No newline at end of file diff --git a/public/demo/dxf_8.html b/public/demo/dxf_8.html index 17a7f91..8dc42bc 100644 --- a/public/demo/dxf_8.html +++ b/public/demo/dxf_8.html @@ -86,7 +86,7 @@ const fontFiles = ["./demo/three/fonts/hztxt.shx", "./demo/three/fonts/simplex.shx"]; await compareHelper.setFont(fontFiles); - compareHelper.viewer1.toolbar?.updateMenus( + compareHelper.viewer.toolbar?.updateMenus( overrideToolbarConfig(compareHelper.viewer1) ); compareHelper.viewer2.toolbar?.updateMenus(