From be9431dd8c543b4c2028128bc10b6dcbba317574 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Thu, 14 Nov 2024 16:03:42 +1300 Subject: [PATCH 1/7] Update src/components.d.ts --- src/components.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components.d.ts b/src/components.d.ts index e08c7ce..c217a18 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,6 +7,7 @@ export {} declare module 'vue' { export interface GlobalComponents { + ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElButton: typeof import('element-plus/es')['ElButton'] ElCol: typeof import('element-plus/es')['ElCol'] ElCollapse: typeof import('element-plus/es')['ElCollapse'] @@ -19,6 +20,7 @@ declare module 'vue' { ElIconDelete: typeof import('@element-plus/icons-vue')['Delete'] ElIconPlus: typeof import('@element-plus/icons-vue')['Plus'] ElIconWarningFilled: typeof import('@element-plus/icons-vue')['WarningFilled'] + ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMain: typeof import('element-plus/es')['ElMain'] ElOption: typeof import('element-plus/es')['ElOption'] @@ -26,6 +28,9 @@ declare module 'vue' { ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSlider: typeof import('element-plus/es')['ElSlider'] + ElSwitch: typeof import('element-plus/es')['ElSwitch'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] LinesControls: typeof import('./components/LinesControls.vue')['default'] From 218bf27590a44c7b3cd2dce8f42d427626ce80ae Mon Sep 17 00:00:00 2001 From: alan-wu Date: Thu, 14 Nov 2024 16:05:12 +1300 Subject: [PATCH 2/7] 1.6.0 --- CHANGELOG.md | 18 +++++++++++++++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86da40f..2a011da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v1.6.0-beta.1](https://github.com/alan-wu/scaffoldvuer/compare/v1.5.1...v1.6.0-beta.1) +## [v1.6.0](https://github.com/alan-wu/scaffoldvuer/compare/v1.6.0-beta.1...v1.6.0) + +### Merged + +- Support external annotation display [`#146`](https://github.com/alan-wu/scaffoldvuer/pull/146) +- Fix some annotation related issue [`#2`](https://github.com/alan-wu/scaffoldvuer/pull/2) +- Annotation [`#5`](https://github.com/alan-wu/scaffoldvuer/pull/5) +- State saving [`#148`](https://github.com/alan-wu/scaffoldvuer/pull/148) +- Improve searching, making it consistent with flatmapvuer. [`#147`](https://github.com/alan-wu/scaffoldvuer/pull/147) + +### Commits + +- Update src/components.d.ts [`be9431d`](https://github.com/alan-wu/scaffoldvuer/commit/be9431dd8c543b4c2028128bc10b6dcbba317574) +- Merge in changes. [`aa853de`](https://github.com/alan-wu/scaffoldvuer/commit/aa853de47c582dd83915abf25aa5c1e2bf8768b0) +- Improve searching, making it consistence with flatmapvuer. [`f4f793d`](https://github.com/alan-wu/scaffoldvuer/commit/f4f793d33027ba73ed2a1a631d3d2a0559485844) + +## [v1.6.0-beta.1](https://github.com/alan-wu/scaffoldvuer/compare/v1.5.1...v1.6.0-beta.1) - 2024-10-31 ### Commits diff --git a/package-lock.json b/package-lock.json index e8e668a..9ca6ca1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@abi-software/scaffoldvuer", - "version": "1.6.0-beta.1", + "version": "1.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@abi-software/scaffoldvuer", - "version": "1.6.0-beta.1", + "version": "1.6.0", "license": "Apache-2.0", "dependencies": { "@abi-software/map-utilities": "^1.2.0", diff --git a/package.json b/package.json index 35cd7f4..95e32ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@abi-software/scaffoldvuer", - "version": "1.6.0-beta.1", + "version": "1.6.0", "license": "Apache-2.0", "repository": { "type": "git", From 9672dd96a23a78207843c4e5ccb53eed348cd780 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Thu, 14 Nov 2024 20:17:51 +1300 Subject: [PATCH 3/7] Fix few issues with annotator. --- src/components.d.ts | 5 ----- src/components/ScaffoldVuer.vue | 28 ++++++++++++++++------------ src/scripts/Search.js | 1 - 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/components.d.ts b/src/components.d.ts index c217a18..e08c7ce 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,7 +7,6 @@ export {} declare module 'vue' { export interface GlobalComponents { - ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElButton: typeof import('element-plus/es')['ElButton'] ElCol: typeof import('element-plus/es')['ElCol'] ElCollapse: typeof import('element-plus/es')['ElCollapse'] @@ -20,7 +19,6 @@ declare module 'vue' { ElIconDelete: typeof import('@element-plus/icons-vue')['Delete'] ElIconPlus: typeof import('@element-plus/icons-vue')['Plus'] ElIconWarningFilled: typeof import('@element-plus/icons-vue')['WarningFilled'] - ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMain: typeof import('element-plus/es')['ElMain'] ElOption: typeof import('element-plus/es')['ElOption'] @@ -28,9 +26,6 @@ declare module 'vue' { ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSlider: typeof import('element-plus/es')['ElSlider'] - ElSwitch: typeof import('element-plus/es')['ElSwitch'] - ElTable: typeof import('element-plus/es')['ElTable'] - ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] LinesControls: typeof import('./components/LinesControls.vue')['default'] diff --git a/src/components/ScaffoldVuer.vue b/src/components/ScaffoldVuer.vue index e61e2ba..c84f55b 100644 --- a/src/components/ScaffoldVuer.vue +++ b/src/components/ScaffoldVuer.vue @@ -1338,7 +1338,7 @@ export default { this.$module.selectObjectOnPick = true; } else if (type === 'tool') { this.activeDrawTool = icon; - this.createData.shape = this.activeDrawTool; + this.createData.shape = this.activeDrawTool ? this.activeDrawTool : ''; this.$module.selectObjectOnPick = false; } }, @@ -1544,6 +1544,16 @@ export default { }); zincObjects = event.zincObjects; } + let id = undefined; + let regionPath = undefined; + if (event.identifiers.length > 0 && event.identifiers[0]) { + id = event.identifiers[0].data.id + ? event.identifiers[0].data.id + : event.identifiers[0].data.group; + if (event.identifiers[0].data.region) { + regionPath = event.identifiers[0].data.region; + } + } /* * Event Type 1: Selected * Event Type 2: Highlighted @@ -1551,6 +1561,8 @@ export default { */ if (event.eventType == 1) { if (this.viewingMode === 'Annotation') { + this.tData.label = id; + this.tData.region = regionPath; this.activateAnnotationMode(names, event); } else { if (this.$refs.scaffoldTreeControls) { @@ -1566,7 +1578,7 @@ export default { //identifiers. if (event.identifiers.length === 1) { this.lastSelected.isSearch = false; - this.lastSelected.region = event.identifiers[0].data.region; + this.lastSelected.region = regionPath; this.lastSelected.group = event.identifiers[0].data.group; } else if (event.identifiers.length === 0) { this.lastSelected.isSearch = false; @@ -1590,21 +1602,13 @@ export default { } } if (event.identifiers.length > 0 && event.identifiers[0]) { - let id = event.identifiers[0].data.id - ? event.identifiers[0].data.id - : event.identifiers[0].data.group; if (event.identifiers[0].coords) { this.tData.active = false; - if (!this.annotationSidebar) { + if (!this.viewingMode !== "Annotation" || !this.annotationSidebar) { this.tData.visible = true; } this.tData.label = id; - if (event.identifiers[0].data.region) { - this.tData.region = event.identifiers[0].data.region; - } - else { - this.tData.region = undefined; - } + this.tData.region = regionPath; this.tData.x = event.identifiers[0].coords.x; this.tData.y = event.identifiers[0].coords.y; this.createEditTemporaryLines(event.identifiers); diff --git a/src/scripts/Search.js b/src/scripts/Search.js index b163ccc..94df44e 100644 --- a/src/scripts/Search.js +++ b/src/scripts/Search.js @@ -150,7 +150,6 @@ export class SearchIndex let results = undefined; if (text.length > 2 && ["'", '"'].includes(text.slice(0, 1))) { text = text.replaceAll(text.slice(0, 1), '') - console.log(text) results = this._searchEngine.search(text, {prefix: true, combineWith: 'AND'}) } else if (text.length > 1) { results = this._searchEngine.search(text, {prefix: true}) From c10788bc728b5b85e11fdb2440d51ae441a3f9de Mon Sep 17 00:00:00 2001 From: alan-wu Date: Thu, 14 Nov 2024 20:18:34 +1300 Subject: [PATCH 4/7] 1.6.1 --- CHANGELOG.md | 8 +++++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a011da..257c339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v1.6.0](https://github.com/alan-wu/scaffoldvuer/compare/v1.6.0-beta.1...v1.6.0) +## [v1.6.1](https://github.com/alan-wu/scaffoldvuer/compare/v1.6.0...v1.6.1) + +### Commits + +- Fix few issues with annotator. [`9672dd9`](https://github.com/alan-wu/scaffoldvuer/commit/9672dd96a23a78207843c4e5ccb53eed348cd780) + +## [v1.6.0](https://github.com/alan-wu/scaffoldvuer/compare/v1.6.0-beta.1...v1.6.0) - 2024-11-14 ### Merged diff --git a/package-lock.json b/package-lock.json index 9ca6ca1..99c3322 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@abi-software/scaffoldvuer", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@abi-software/scaffoldvuer", - "version": "1.6.0", + "version": "1.6.1", "license": "Apache-2.0", "dependencies": { "@abi-software/map-utilities": "^1.2.0", diff --git a/package.json b/package.json index 95e32ac..ac96d55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@abi-software/scaffoldvuer", - "version": "1.6.0", + "version": "1.6.1", "license": "Apache-2.0", "repository": { "type": "git", From d7692039b56da40d4310196a5bf007c8aee5acb3 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Fri, 15 Nov 2024 10:39:24 +1300 Subject: [PATCH 5/7] Fix a logical error. --- src/components/ScaffoldVuer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ScaffoldVuer.vue b/src/components/ScaffoldVuer.vue index c84f55b..30e77a0 100644 --- a/src/components/ScaffoldVuer.vue +++ b/src/components/ScaffoldVuer.vue @@ -1604,7 +1604,7 @@ export default { if (event.identifiers.length > 0 && event.identifiers[0]) { if (event.identifiers[0].coords) { this.tData.active = false; - if (!this.viewingMode !== "Annotation" || !this.annotationSidebar) { + if (this.viewingMode !== "Annotation" || !this.annotationSidebar) { this.tData.visible = true; } this.tData.label = id; From 5cecb673c01e7c55eaf45545199b6359ba0d59c0 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Fri, 15 Nov 2024 10:51:23 +1300 Subject: [PATCH 6/7] 1.6.2 --- CHANGELOG.md | 8 +++++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 257c339..c084390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v1.6.1](https://github.com/alan-wu/scaffoldvuer/compare/v1.6.0...v1.6.1) +## [v1.6.2](https://github.com/alan-wu/scaffoldvuer/compare/v1.6.1...v1.6.2) + +### Commits + +- Fix a logical error. [`d769203`](https://github.com/alan-wu/scaffoldvuer/commit/d7692039b56da40d4310196a5bf007c8aee5acb3) + +## [v1.6.1](https://github.com/alan-wu/scaffoldvuer/compare/v1.6.0...v1.6.1) - 2024-11-14 ### Commits diff --git a/package-lock.json b/package-lock.json index 99c3322..2f6087b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@abi-software/scaffoldvuer", - "version": "1.6.1", + "version": "1.6.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@abi-software/scaffoldvuer", - "version": "1.6.1", + "version": "1.6.2", "license": "Apache-2.0", "dependencies": { "@abi-software/map-utilities": "^1.2.0", diff --git a/package.json b/package.json index ac96d55..85c9516 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@abi-software/scaffoldvuer", - "version": "1.6.1", + "version": "1.6.2", "license": "Apache-2.0", "repository": { "type": "git", From 861f8817fbbee27c6e961732f98bcc6e19be1df5 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Fri, 29 Nov 2024 16:05:59 +1300 Subject: [PATCH 7/7] Handle json parsing error and add on error callback. --- package-lock.json | 14 +++++++------- package.json | 2 +- src/App.vue | 12 ++++++++++++ src/app/DropZone.vue | 12 ++++++++++-- src/components/ScaffoldVuer.vue | 8 ++++++++ src/scripts/OrgansRenderer.js | 34 +++++++++++++++++++++++++++------ 6 files changed, 66 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2f6087b..c82e762 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "vue": "^3.4.21", "vue-router": "^4.2.5", "vue3-component-svg-sprite": "^0.0.1", - "zincjs": "^1.11.4" + "zincjs": "^1.11.5" }, "devDependencies": { "@vitejs/plugin-vue": "^4.6.2", @@ -3146,9 +3146,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -9031,9 +9031,9 @@ } }, "node_modules/zincjs": { - "version": "1.11.4", - "resolved": "https://registry.npmjs.org/zincjs/-/zincjs-1.11.4.tgz", - "integrity": "sha512-iyooc9rZLURS4X166W5cZ45QBTGjbnYRyFsORBZClz6r/8g+udpOMu3dc+Z+Ya/VhcItZY/l/tpxwIYHeoJ+8A==", + "version": "1.11.5", + "resolved": "https://registry.npmjs.org/zincjs/-/zincjs-1.11.5.tgz", + "integrity": "sha512-FXaPZWML7ztw7gWoFQiGc9Zr55vQmLVadAlUQVE5oEmur/WG3XBOPzNNbli56WPzau4pAbeA06IENS3sskfBsw==", "dependencies": { "css-element-queries": "^1.2.2", "lodash": "^4.17.19", diff --git a/package.json b/package.json index 85c9516..fd2579d 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "vue": "^3.4.21", "vue-router": "^4.2.5", "vue3-component-svg-sprite": "^0.0.1", - "zincjs": "^1.11.4" + "zincjs": "^1.11.5" }, "devDependencies": { "@vitejs/plugin-vue": "^4.6.2", diff --git a/src/App.vue b/src/App.vue index 9e91452..7900c3b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -29,6 +29,7 @@ :marker-labels="markerLabels" :enableLocalAnnotations="false" @open-map="openMap" + @on-error="onError" @on-ready="onReady" @scaffold-selected="onSelected" @scaffold-navigated="onNavigated" @@ -640,6 +641,17 @@ export default { } }); }, + onError: function(payload) { + if (payload?.type === "download-error") { + const dropZone = this.$refs.dropzone; + if (dropZone) { + const realFilename = dropZone.findRealFilename(payload.xhr.responseURL); + if (realFilename) { + console.error(`External Resource ${realFilename}`); + } + } + } + }, onReady: function () { if (this.consoleOn) console.log(this.$refs.scaffold) if (this.readyCallback) { diff --git a/src/app/DropZone.vue b/src/app/DropZone.vue index 80b2aad..cadb1a7 100644 --- a/src/app/DropZone.vue +++ b/src/app/DropZone.vue @@ -13,6 +13,7 @@