@abi-software/flatmapvuer 1.6.2-beta.2 → 1.6.2-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmapvuer",
3
- "version": "1.6.2-beta.2",
3
+ "version": "1.6.2-beta.4",
4
4
  "license": "Apache-2.0",
5
5
  "files": [
6
6
  "dist/*",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@abi-software/flatmap-viewer": "^3.2.8",
47
- "@abi-software/map-utilities": "^1.2.2-beta.1",
47
+ "@abi-software/map-utilities": "^1.2.2-beta.3",
48
48
  "@abi-software/sparc-annotation": "0.3.2",
49
49
  "@abi-software/svg-sprite": "^1.0.1",
50
50
  "@element-plus/icons-vue": "^2.3.1",
@@ -830,19 +830,19 @@ export default {
830
830
  * @arg {String} `name`
831
831
  */
832
832
  toolbarEvent: function (type, name) {
833
+ if (this.isValidDrawnCreated) return;
833
834
  this.manualAbortedOnClose()
834
835
  this.doubleClickedFeature = false
836
+ // Deselect any feature when draw mode/tool is changed
837
+ this.changeAnnotationDrawMode({ mode: 'simple_select' })
835
838
  if (type === 'mode') {
836
- // Deselect any feature when draw mode is changed
837
- this.changeAnnotationDrawMode({ mode: 'simple_select' })
838
839
  this.activeDrawMode = name
839
840
  } else if (type === 'tool') {
841
+ // Remove any unsubmitted drawn
842
+ this.cancelDrawnFeature()
840
843
  if (name) {
841
844
  const tool = name.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`)
842
845
  this.changeAnnotationDrawMode({ mode: `draw${tool}` })
843
- } else {
844
- this.changeAnnotationDrawMode({ mode: 'simple_select' })
845
- this.cancelDrawnFeature()
846
846
  }
847
847
  this.activeDrawTool = name
848
848
  }
@@ -951,7 +951,9 @@ export default {
951
951
  ) {
952
952
  this.featureAnnotationSubmitted = true
953
953
  this.mapImp.commitAnnotationEvent(this.annotationEntry)
954
- if (this.annotationEntry.type === 'deleted') {
954
+ if (annotation.body.comment === "Position Updated") {
955
+ this.annotationEntry.positionUpdated = false
956
+ } else if (this.annotationEntry.type === 'deleted') {
955
957
  if (this.annotationSidebar) this.$emit("annotation-close")
956
958
  this.closeTooltip()
957
959
  // Only delete need, keep the annotation tooltip/sidebar open if created/updated
@@ -1003,8 +1005,10 @@ export default {
1003
1005
  */
1004
1006
  addAnnotationFeature: async function () {
1005
1007
  if (this.mapImp) {
1006
- if (!this.featureAnnotationSubmitted) this.clearAnnotationFeature()
1007
- if (!this.featureAnnotationSubmitted) this.loading = true
1008
+ if (!this.featureAnnotationSubmitted) {
1009
+ this.clearAnnotationFeature()
1010
+ this.loading = true
1011
+ }
1008
1012
  const userId = this.annotationFrom === 'Anyone' ?
1009
1013
  undefined : this.userInformation.orcid ?
1010
1014
  this.userInformation.orcid : '0000-0000-0000-0000'