@abi-software/flatmapvuer 1.2.0 → 1.3.0

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.
@@ -17,7 +17,7 @@
17
17
  placement="right"
18
18
  popper-class="warning-popper flatmap-popper"
19
19
  :teleported="false"
20
- :visible="hoverVisibilities[6].value"
20
+ :visible="hoverVisibilities[7].value"
21
21
  ref="warningPopover"
22
22
  >
23
23
  <!--
@@ -27,15 +27,15 @@ Please use `const` to assign meaningful names to them...
27
27
  -->
28
28
  <p
29
29
  v-if="isLegacy"
30
- @mouseover="showTooltip(6)"
31
- @mouseout="hideTooltip(6)"
30
+ @mouseover="showTooltip(7)"
31
+ @mouseout="hideTooltip(7)"
32
32
  >
33
33
  This is a legacy map, you may view the latest map instead.
34
34
  </p>
35
35
  <p
36
36
  v-else-if="isFC"
37
- @mouseover="showTooltip(6)"
38
- @mouseout="hideTooltip(6)"
37
+ @mouseover="showTooltip(7)"
38
+ @mouseout="hideTooltip(7)"
39
39
  >
40
40
  This map displays the connectivity of individual neurons.
41
41
  Specifically, those which align with (parts of) the neuron
@@ -99,15 +99,15 @@ Please use `const` to assign meaningful names to them...
99
99
  :teleported="false"
100
100
  trigger="manual"
101
101
  popper-class="warning-popper flatmap-popper"
102
- :visible="hoverVisibilities[7].value"
102
+ :visible="hoverVisibilities[8].value"
103
103
  ref="whatsNewPopover"
104
104
  >
105
105
  <template #reference>
106
106
  <div
107
107
  class="latest-changesicon"
108
108
  v-if="displayLatestChanges"
109
- @mouseover="showTooltip(7)"
110
- @mouseout="hideTooltip(7)"
109
+ @mouseover="showTooltip(8)"
110
+ @mouseout="hideTooltip(8)"
111
111
  >
112
112
  <el-icon><el-icon-warning-filled /></el-icon>
113
113
  <span class="warning-text">What's new?</span>
@@ -142,23 +142,26 @@ Please use `const` to assign meaningful names to them...
142
142
  <el-icon-arrow-down />
143
143
  </el-icon>
144
144
 
145
- <DrawTool
145
+ <DrawToolbar
146
146
  v-if="viewingMode === 'Annotation' && userInformation && !disableUI"
147
- :helpMode="helpMode"
148
- :hoverVisibilities=hoverVisibilities
149
- :flatmapCanvas="this.$el"
147
+ :mapCanvas="{
148
+ containerHTML: this.$el,
149
+ class: '.maplibregl-canvas',
150
+ }"
151
+ :toolbarOptions="toolbarOptions"
150
152
  :drawnType="drawnType"
151
153
  :activeDrawTool="activeDrawTool"
152
154
  :activeDrawMode="activeDrawMode"
153
- :drawnCreatedEvent="drawnCreatedEvent"
155
+ :newlyDrawnEntry="drawnCreatedEvent"
154
156
  :connectionEntry="connectionEntry"
155
- @drawToolbarEvent="drawToolbarEvent"
157
+ :hoverVisibilities="hoverVisibilities"
158
+ @clickToolbar="toolbarEvent"
159
+ @featureTooltip="connectedFeatureTooltip"
156
160
  @confirmDrawn="confirmDrawnFeature"
157
161
  @cancelDrawn="cancelDrawnFeature"
158
- @featureTooltip="connectedFeatureTooltip"
159
162
  @showTooltip="showTooltip"
160
163
  @hideTooltip="hideTooltip"
161
- ref="drawToolPopover"
164
+ ref="toolbarPopover"
162
165
  />
163
166
 
164
167
  <div class="bottom-right-control" v-show="!disableUI">
@@ -169,7 +172,7 @@ Please use `const` to assign meaningful names to them...
169
172
  trigger="manual"
170
173
  width="70"
171
174
  popper-class="flatmap-popper"
172
- :visible="hoverVisibilities[0].value"
175
+ :visible="hoverVisibilities[1].value"
173
176
  ref="zoomInPopover"
174
177
  >
175
178
  <template #reference>
@@ -177,8 +180,8 @@ Please use `const` to assign meaningful names to them...
177
180
  icon="zoomIn"
178
181
  class="icon-button zoomIn"
179
182
  @click="zoomIn()"
180
- @mouseover="showTooltip(0)"
181
- @mouseout="hideTooltip(0)"
183
+ @mouseover="showTooltip(1)"
184
+ @mouseout="hideTooltip(1)"
182
185
  />
183
186
  </template>
184
187
  </el-popover>
@@ -189,7 +192,7 @@ Please use `const` to assign meaningful names to them...
189
192
  trigger="manual"
190
193
  width="70"
191
194
  popper-class="flatmap-popper"
192
- :visible="hoverVisibilities[1].value"
195
+ :visible="hoverVisibilities[2].value"
193
196
  ref="zoomOutPopover"
194
197
  >
195
198
  <template #reference>
@@ -197,8 +200,8 @@ Please use `const` to assign meaningful names to them...
197
200
  icon="zoomOut"
198
201
  class="icon-button zoomOut"
199
202
  @click="zoomOut()"
200
- @mouseover="showTooltip(1)"
201
- @mouseout="hideTooltip(1)"
203
+ @mouseover="showTooltip(2)"
204
+ @mouseout="hideTooltip(2)"
202
205
  />
203
206
  </template>
204
207
  </el-popover>
@@ -209,7 +212,7 @@ Please use `const` to assign meaningful names to them...
209
212
  trigger="manual"
210
213
  width="70"
211
214
  popper-class="flatmap-popper"
212
- :visible="hoverVisibilities[2].value"
215
+ :visible="hoverVisibilities[3].value"
213
216
  ref="zoomFitPopover"
214
217
  >
215
218
  <div>
@@ -222,8 +225,8 @@ Please use `const` to assign meaningful names to them...
222
225
  icon="fitWindow"
223
226
  class="icon-button fitWindow"
224
227
  @click="resetView()"
225
- @mouseover="showTooltip(2)"
226
- @mouseout="hideTooltip(2)"
228
+ @mouseover="showTooltip(3)"
229
+ @mouseout="hideTooltip(3)"
227
230
  />
228
231
  </template>
229
232
  </el-popover>
@@ -235,7 +238,7 @@ Please use `const` to assign meaningful names to them...
235
238
  trigger="manual"
236
239
  :offset="-18"
237
240
  popper-class="flatmap-popper"
238
- :visible="hoverVisibilities[4].value"
241
+ :visible="hoverVisibilities[6].value"
239
242
  ref="checkBoxPopover"
240
243
  >
241
244
  <template #reference>
@@ -287,7 +290,7 @@ Please use `const` to assign meaningful names to them...
287
290
  >
288
291
  <template #reference>
289
292
  <div
290
- v-show="hoverVisibilities[5].value"
293
+ v-show="hoverVisibilities[0].value"
291
294
  class="flatmap-marker-help"
292
295
  v-html="flatmapMarker"
293
296
  v-popover:markerPopover
@@ -296,13 +299,16 @@ Please use `const` to assign meaningful names to them...
296
299
  </el-popover>
297
300
  <tree-controls
298
301
  v-if="isFC && systems && systems.length > 0"
302
+ class="treeControls"
303
+ mapType="flatmap"
304
+ title="Systems"
305
+ :treeData="systems"
299
306
  :active="currentActive"
300
307
  :hover="currentHover"
301
- :tree-data="systems"
302
- ref="treeControls"
303
- @changed="systemSelected"
308
+ @checkChanged="systemSelected"
304
309
  @checkAll="checkAllSystems"
305
- @change-active="ftuSelected"
310
+ @changeActive="ftuSelected"
311
+ ref="treeControls"
306
312
  />
307
313
  <selections-group
308
314
  v-if="containsAlert && alertOptions"
@@ -551,7 +557,7 @@ Please use `const` to assign meaningful names to them...
551
557
  >
552
558
  <el-row>
553
559
  <el-popover
554
- :visible="hoverVisibilities[8].value"
560
+ :visible="hoverVisibilities[4].value"
555
561
  content="Open new map"
556
562
  placement="right"
557
563
  :teleported="false"
@@ -564,8 +570,8 @@ Please use `const` to assign meaningful names to them...
564
570
  ref="openMapRef"
565
571
  icon="openMap"
566
572
  class="icon-button open-map-button"
567
- @mouseover="showTooltip(8)"
568
- @mouseout="hideTooltip(8)"
573
+ @mouseover="showTooltip(4)"
574
+ @mouseout="hideTooltip(4)"
569
575
  />
570
576
  </template>
571
577
  </el-popover>
@@ -574,7 +580,7 @@ Please use `const` to assign meaningful names to them...
574
580
  <el-popover
575
581
  content="Change settings"
576
582
  placement="right"
577
- :visible="hoverVisibilities[3].value"
583
+ :visible="hoverVisibilities[5].value"
578
584
  :teleported="false"
579
585
  trigger="manual"
580
586
  popper-class="flatmap-popper"
@@ -585,8 +591,8 @@ Please use `const` to assign meaningful names to them...
585
591
  ref="backgroundIconRef"
586
592
  icon="changeBckgd"
587
593
  class="icon-button"
588
- @mouseover="showTooltip(3)"
589
- @mouseout="hideTooltip(3)"
594
+ @mouseover="showTooltip(5)"
595
+ @mouseout="hideTooltip(5)"
590
596
  />
591
597
  </template>
592
598
  </el-popover>
@@ -597,7 +603,7 @@ Please use `const` to assign meaningful names to them...
597
603
  class="tooltip"
598
604
  v-show="tooltipDisplay"
599
605
  :annotationEntry="annotationEntry"
600
- :entry="tooltipEntry"
606
+ :tooltipEntry="tooltipEntry"
601
607
  :annotationDisplay="viewingMode === 'Annotation'"
602
608
  @annotation="commitAnnotationEvent"
603
609
  />
@@ -613,9 +619,7 @@ import {
613
619
  ArrowDown as ElIconArrowDown,
614
620
  ArrowLeft as ElIconArrowLeft,
615
621
  } from '@element-plus/icons-vue'
616
- import Tooltip from './Tooltip.vue'
617
622
  import SelectionsGroup from './SelectionsGroup.vue'
618
- import TreeControls from './TreeControls.vue'
619
623
  import { MapSvgIcon, MapSvgSpriteColor } from '@abi-software/svg-sprite'
620
624
  import '@abi-software/svg-sprite/dist/style.css'
621
625
  import SvgLegends from './legends/SvgLegends.vue'
@@ -641,7 +645,8 @@ import * as flatmap from '@abi-software/flatmap-viewer'
641
645
  import { AnnotationService } from '@abi-software/sparc-annotation'
642
646
  import { mapState } from 'pinia'
643
647
  import { useMainStore } from '@/store/index'
644
- import DrawTool from './DrawTool.vue'
648
+ import { DrawToolbar, Tooltip, TreeControls } from '@abi-software/map-utilities'
649
+ import '@abi-software/map-utilities/dist/style.css'
645
650
 
646
651
  const centroid = (geometry) => {
647
652
  let featureGeometry = { lng: 0, lat: 0, }
@@ -749,7 +754,7 @@ export default {
749
754
  ElIconWarningFilled,
750
755
  ElIconArrowDown,
751
756
  ElIconArrowLeft,
752
- DrawTool
757
+ DrawToolbar
753
758
  },
754
759
  beforeCreate: function () {
755
760
  this.mapManager = undefined
@@ -772,14 +777,14 @@ export default {
772
777
  this.connectionEntry = {}
773
778
  this.activeDrawTool = undefined
774
779
  this.activeDrawMode = undefined
775
- this.drawnCreatedEvent = undefined
780
+ this.drawnCreatedEvent = {}
776
781
  },
777
782
  /**
778
783
  * @vuese
779
784
  * Function to cancel a newly drawn feature.
780
785
  */
781
786
  cancelDrawnFeature: function () {
782
- if (this.drawnCreatedEvent) {
787
+ if (this.isValidDrawnCreated) {
783
788
  this.closeTooltip()
784
789
  this.annotationEntry = {
785
790
  ...this.drawnCreatedEvent.feature,
@@ -819,7 +824,7 @@ export default {
819
824
  * Function to confirm a newly drawn feature.
820
825
  */
821
826
  confirmDrawnFeature: function () {
822
- if (this.drawnCreatedEvent) {
827
+ if (this.isValidDrawnCreated) {
823
828
  this.checkAndCreatePopups(this.drawnCreatedEvent)
824
829
  // Add connection if exist to annotationEntry
825
830
  // Connection will only be added in creating new drawn feature annotation
@@ -835,27 +840,37 @@ export default {
835
840
  * Function to process the annotation toolbar click events.
836
841
  * @arg type
837
842
  */
838
- drawToolbarEvent: function (type) {
843
+ toolbarEvent: function (type, name) {
839
844
  this.closeTooltip()
840
845
  this.doubleClickedFeature = false
841
- if (type === 'Delete') {
842
- this.activeDrawMode = this.activeDrawMode === 'Delete' ? undefined : 'Delete'
843
- } else if (type === 'Edit') {
844
- this.activeDrawMode = this.activeDrawMode === 'Edit' ? undefined : 'Edit'
845
- } else {
846
- this.activeDrawTool = type
847
- }
848
- if (Object.keys(this.annotationEntry).length > 0 && !this.featureAnnotationSubmitted) {
849
- this.rollbackAnnotationEvent()
846
+ this.connectionEntry = {}
847
+ if (type === 'mode') {
848
+ // Deselect any feature when draw mode is changed
849
+ this.changeAnnotationDrawMode({ mode: 'simple_select' })
850
+ this.activeDrawMode = name
851
+ // rollback modified feature when exit edit/delete mode
852
+ if (Object.keys(this.annotationEntry).length > 0 && !this.featureAnnotationSubmitted) {
853
+ this.rollbackAnnotationEvent()
854
+ }
855
+ } else if (type === 'tool') {
856
+ if (name) {
857
+ const tool = name.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`)
858
+ this.changeAnnotationDrawMode({ mode: `draw${tool}` })
859
+ this.initialiseDrawing()
860
+ } else {
861
+ this.changeAnnotationDrawMode({ mode: 'simple_select' })
862
+ this.cancelDrawnFeature()
863
+ }
864
+ this.activeDrawTool = name
850
865
  }
851
866
  },
852
- /**
867
+ /**
853
868
  * @vuese
854
869
  * Function to fire annotation event based on the provided ``data``.
855
- * Either edit or delete event.
870
+ * Either edit or delete action.
856
871
  * @arg data
857
872
  */
858
- drawModeEvent: function (data) {
873
+ annotationDrawModeEvent: function (data) {
859
874
  if (this.activeDrawMode === 'Edit') {
860
875
  if (this.doubleClickedFeature) {
861
876
  if (data.feature.feature.geometry.type !== 'Point') {
@@ -954,8 +969,13 @@ export default {
954
969
  ) {
955
970
  this.featureAnnotationSubmitted = true
956
971
  this.mapImp.commitAnnotationEvent(this.annotationEntry)
957
- if (this.annotationEntry.type === 'deleted') this.closeTooltip()
958
- else this.addAnnotationFeature() // Update 'existDrawnFeatures' when created or updated event
972
+ if (this.annotationEntry.type === 'deleted') {
973
+ this.closeTooltip()
974
+ this.annotationEntry = {}
975
+ } else {
976
+ // Update 'existDrawnFeatures' when created or updated event
977
+ this.addAnnotationFeature()
978
+ }
959
979
  }
960
980
  },
961
981
  /**
@@ -1284,8 +1304,8 @@ export default {
1284
1304
 
1285
1305
  // Loop through the path features and check if we have origin nodes
1286
1306
  pathFeatures.forEach((p) => {
1287
-
1288
- // Get the nodes from each path feature
1307
+
1308
+ // Get the nodes from each path feature
1289
1309
  this.mapImp.nodePathModels(p.featureId).forEach((f) => {
1290
1310
  highlight = true
1291
1311
  // s2 here is the second level paths
@@ -1297,7 +1317,7 @@ export default {
1297
1317
  return
1298
1318
  }
1299
1319
  })
1300
-
1320
+
1301
1321
  if (highlight) {
1302
1322
  toHighlight.push(f)
1303
1323
  }
@@ -1471,11 +1491,11 @@ export default {
1471
1491
  taxonMouseEnterEmitted: function (payload) {
1472
1492
  if (this.mapImp) {
1473
1493
  if (payload.value) {
1474
- let gid = this.mapImp.taxonFeatureIds(payload.key)
1494
+ let gid = this.mapImp.taxonFeatureIds(payload.key)
1475
1495
  this.mapImp.enableConnectivityByTaxonIds(payload.key, payload.value) // make sure path is visible
1476
1496
  this.mapImp.zoomToGeoJSONFeatures(gid, {noZoomIn: true})
1477
1497
  } else {
1478
- // reset visibility of paths
1498
+ // reset visibility of paths
1479
1499
  this.mapImp.selectGeoJSONFeatures("-1")
1480
1500
  payload.selections.forEach((item) => {
1481
1501
  let show = payload.checked.includes(item.taxon)
@@ -1543,11 +1563,7 @@ export default {
1543
1563
  if (!this.featureAnnotationSubmitted) this.rollbackAnnotationEvent()
1544
1564
  else this.featureAnnotationSubmitted = false
1545
1565
  } else if (data.type === 'modeChanged') {
1546
- if (data.feature.mode === 'simple_select' && this.activeDrawTool) {
1547
- if (!this.drawnCreatedEvent) this.initialiseDrawing() // Reset if invalid linestring or polygon
1548
- } else if (data.feature.mode === 'direct_select') {
1549
- this.doubleClickedFeature = true
1550
- }
1566
+ if (data.feature.mode === 'direct_select') this.doubleClickedFeature = true
1551
1567
  } else if (data.type === 'selectionChanged') {
1552
1568
  this.selectedDrawnFeature = data.feature.features.length === 0 ?
1553
1569
  undefined : data.feature.features[0]
@@ -1562,7 +1578,7 @@ export default {
1562
1578
  if (drawnFeature && drawnFeature.connection) {
1563
1579
  this.connectionEntry = drawnFeature.connection
1564
1580
  }
1565
- this.drawModeEvent(payload)
1581
+ this.annotationDrawModeEvent(payload)
1566
1582
  }
1567
1583
  }
1568
1584
  } else {
@@ -1629,7 +1645,7 @@ export default {
1629
1645
  } else {
1630
1646
  this.currentActive = data.models ? data.models : ''
1631
1647
  // Drawing connectivity between features
1632
- if (this.activeDrawTool && !this.drawnCreatedEvent) {
1648
+ if (this.activeDrawTool && !this.isValidDrawnCreated) {
1633
1649
  // Check if flatmap features or existing drawn features
1634
1650
  const validDrawnFeature = data.featureId || this.existDrawnFeatures.find(
1635
1651
  (feature) => feature.id === data.id
@@ -1749,6 +1765,11 @@ export default {
1749
1765
  popupCloseButton.style.display = 'block'
1750
1766
  this.$refs.tooltip.$el.style.display = 'flex'
1751
1767
  popupCloseButton.onclick = () => {
1768
+ /**
1769
+ * This event is emitted
1770
+ * when a connectivity info (provenance popup) is closed.
1771
+ */
1772
+ this.$emit('connectivity-info-close');
1752
1773
  if (ftooltip) ftooltip.style.display = 'block'
1753
1774
  }
1754
1775
  },
@@ -1962,7 +1983,6 @@ export default {
1962
1983
  * @arg feature
1963
1984
  */
1964
1985
  displayTooltip: function (feature, geometry = undefined) {
1965
- this.tooltipDisplay = true
1966
1986
  let featureId = undefined
1967
1987
  let options = { className: 'flatmapvuer-popover' }
1968
1988
  if (geometry) {
@@ -1974,13 +1994,59 @@ export default {
1974
1994
  options.positionAtLastClick = true
1975
1995
  }
1976
1996
  }
1977
- if (!this.disableUI) {
1997
+ // If connectivityInfoSidebar is set to `true`
1998
+ // Connectivity info will show in sidebar
1999
+ if (this.connectivityInfoSidebar && this.viewingMode !== 'Annotation') {
2000
+ // move the map center to highlighted area
2001
+ // this method is moved to sidebar connectivity info
2002
+ // const featureIds = [feature];
2003
+ // this.moveMap(featureIds);
2004
+ this.$emit('connectivity-info-open', this.tooltipEntry);
2005
+ }
2006
+ // If UI is not disabled,
2007
+ // And connectivityInfoSidebar is not set (default) or set to `false`
2008
+ // Provenance popup will be shown on map
2009
+ // Tooltip will be shown for Annotation view
2010
+ if (!this.disableUI && (!this.connectivityInfoSidebar || this.viewingMode === 'Annotation')) {
2011
+ this.tooltipDisplay = true;
1978
2012
  this.$nextTick(() => {
1979
2013
  this.mapImp.showPopup(featureId, this.$refs.tooltip.$el, options)
1980
2014
  this.popUpCssHacks()
1981
2015
  })
1982
2016
  }
1983
2017
  },
2018
+ /**
2019
+ * Move the map to the left side
2020
+ * to the visible area of the feature IDs
2021
+ * because the sidebar is opened
2022
+ * @arg featureIds
2023
+ */
2024
+ moveMap: function (featureIds, options = {}) {
2025
+ if (this.mapImp) {
2026
+ const { offsetX = 0, offsetY = 0, zoom = 4 } = options;
2027
+ const Map = this.mapImp._map;
2028
+ const bbox = this.mapImp._bounds.toArray();
2029
+
2030
+ // Zoom the map to features first
2031
+ this.mapImp.zoomToFeatures(featureIds, { noZoomIn: true });
2032
+
2033
+ // Hide the left pathway drawer
2034
+ // to get more space for the map
2035
+ this.showPathwaysDrawer(false);
2036
+
2037
+ // Move the map to left side
2038
+ // since the sidebar is taking space on the right
2039
+ if (bbox?.length) {
2040
+ setTimeout(() => {
2041
+ Map.fitBounds(bbox, {
2042
+ offset: [offsetX, offsetY],
2043
+ zoom: zoom,
2044
+ animate: true
2045
+ });
2046
+ });
2047
+ }
2048
+ }
2049
+ },
1984
2050
  /**
1985
2051
  * @vuese
1986
2052
  * Function to open Flatmap Help Popup.
@@ -2161,6 +2227,7 @@ export default {
2161
2227
  minZoom: this.minZoom,
2162
2228
  tooltips: this.tooltips,
2163
2229
  minimap: minimap,
2230
+ // tooltipDelay: 15, // new feature to delay tooltips showing
2164
2231
  }
2165
2232
  )
2166
2233
  promise1.then((returnedObject) => {
@@ -2239,12 +2306,29 @@ export default {
2239
2306
  this.computePathControlsMaximumHeight()
2240
2307
  this.drawerOpen = true
2241
2308
  this.mapResize()
2309
+ this.handleMapClick();
2242
2310
  /**
2243
2311
  * This is ``onFlatmapReady`` event.
2244
2312
  * @arg ``this`` (Component Vue Instance)
2245
2313
  */
2246
2314
  this.$emit('ready', this)
2247
2315
  },
2316
+ /**
2317
+ * @vuese
2318
+ * Function to handle mouse click on map area
2319
+ * after the map is loaded.
2320
+ */
2321
+ handleMapClick: function () {
2322
+ const _map = this.mapImp._map;
2323
+
2324
+ if (_map) {
2325
+ _map.on('click', (e) => {
2326
+ if (this.tooltipEntry.featureId) {
2327
+ this.$emit('connectivity-info-close');
2328
+ }
2329
+ });
2330
+ }
2331
+ },
2248
2332
  /**
2249
2333
  * @vuese
2250
2334
  * Function to show or hide the minimap
@@ -2494,7 +2578,14 @@ export default {
2494
2578
  disableUI: {
2495
2579
  type: Boolean,
2496
2580
  default: false,
2497
- }
2581
+ },
2582
+ /**
2583
+ * The option to show connectivity information in sidebar
2584
+ */
2585
+ connectivityInfoSidebar: {
2586
+ type: Boolean,
2587
+ default: false,
2588
+ },
2498
2589
  },
2499
2590
  provide() {
2500
2591
  return {
@@ -2532,22 +2623,22 @@ export default {
2532
2623
  taxonConnectivity: [],
2533
2624
  pathwaysMaxHeight: 1000,
2534
2625
  hoverVisibilities: [
2535
- { value: false, ref: 'zoomInPopover' }, // 0
2536
- { value: false, ref: 'zoomOutPopover' }, // 1
2537
- { value: false, ref: 'zoomFitPopover' }, // 2
2538
- { value: false, ref: 'settingsPopover' }, // 3
2539
- { value: false, ref: 'checkBoxPopover' }, // 4
2540
- { value: false, ref: 'markerPopover' }, // 5
2541
- { value: false, ref: 'warningPopover' }, // 6
2542
- { value: false, ref: 'whatsNewPopover' }, // 7
2543
- { value: false, ref: 'openMapPopover' }, // 8
2626
+ { value: false, ref: 'markerPopover' }, // 0
2627
+ { value: false, ref: 'zoomInPopover' }, // 1
2628
+ { value: false, ref: 'zoomOutPopover' }, // 2
2629
+ { value: false, ref: 'zoomFitPopover' }, // 3
2630
+ { value: false, ref: 'openMapPopover' }, // 4
2631
+ { value: false, ref: 'settingsPopover' }, // 5
2632
+ { value: false, ref: 'checkBoxPopover' }, // 6
2633
+ { value: false, ref: 'warningPopover' }, // 7
2634
+ { value: false, ref: 'whatsNewPopover' }, // 8
2544
2635
  { value: false, ref: 'featuredMarkerPopover' }, // 9
2545
- { value: false, refs: 'drawToolPopover', ref: 'connectionPopover' }, // 10
2546
- { value: false, refs: 'drawToolPopover', ref: 'drawPointPopover' }, // 11
2547
- { value: false, refs: 'drawToolPopover', ref: 'drawLinePopover' }, // 12
2548
- { value: false, refs: 'drawToolPopover', ref: 'drawPolygonPopover' }, // 13
2549
- { value: false, refs: 'drawToolPopover', ref: 'deletePopover' }, // 14
2550
- { value: false, refs: 'drawToolPopover', ref: 'editPopover' }, // 15
2636
+ { value: false, refs: "toolbarPopover", ref: "editPopover" }, // 10
2637
+ { value: false, refs: "toolbarPopover", ref: "deletePopover" }, // 11
2638
+ { value: false, refs: "toolbarPopover", ref: "pointPopover" }, // 12
2639
+ { value: false, refs: "toolbarPopover", ref: "lineStringPopover" }, // 13
2640
+ { value: false, refs: "toolbarPopover", ref: "polygonPopover" }, // 14
2641
+ { value: false, refs: "toolbarPopover", ref: "connectionPopover" }, // 15
2551
2642
  ],
2552
2643
  helpModeActiveIndex: this.helpModeInitialIndex,
2553
2644
  yellowstar: yellowstar,
@@ -2573,7 +2664,7 @@ export default {
2573
2664
  viewingModeIndex: 0,
2574
2665
  viewingModes: {
2575
2666
  0: {
2576
- name: 'Exploration',
2667
+ name: 'Exploration',
2577
2668
  description:'Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources'
2578
2669
  },
2579
2670
  1: {
@@ -2591,16 +2682,23 @@ export default {
2591
2682
  annotatedTypes: ['Anyone', 'Me', 'Others'],
2592
2683
  openMapRef: undefined,
2593
2684
  backgroundIconRef: undefined,
2685
+ toolbarOptions: [
2686
+ "Edit",
2687
+ "Delete",
2688
+ "Point",
2689
+ "LineString",
2690
+ "Polygon",
2691
+ "Connection",
2692
+ ],
2594
2693
  annotator: undefined,
2595
2694
  userInformation: undefined,
2695
+ activeDrawMode: undefined,
2596
2696
  activeDrawTool: undefined,
2597
- drawnCreatedEvent: undefined,
2598
2697
  featureAnnotationSubmitted: false,
2698
+ drawnCreatedEvent: {},
2599
2699
  connectionEntry: {},
2600
2700
  existDrawnFeatures: [], // Store all exist drawn features
2601
2701
  doubleClickedFeature: false,
2602
- activeDrawMode: undefined,
2603
- drawModes: ['Delete', 'Edit'],
2604
2702
  containsAlert: false,
2605
2703
  alertOptions: [
2606
2704
  {
@@ -2624,9 +2722,12 @@ export default {
2624
2722
  },
2625
2723
  computed: {
2626
2724
  ...mapState(useMainStore, ['userToken']),
2725
+ isValidDrawnCreated: function () {
2726
+ return Object.keys(this.drawnCreatedEvent).length > 0
2727
+ },
2627
2728
  viewingMode: function() {
2628
2729
  return this.viewingModes[this.viewingModeIndex].name
2629
- }
2730
+ },
2630
2731
  },
2631
2732
  watch: {
2632
2733
  entry: function () {
@@ -2675,11 +2776,6 @@ export default {
2675
2776
  })
2676
2777
  } else this.showAnnotator(false)
2677
2778
  },
2678
- activeDrawMode: function () {
2679
- // Deselect any feature when draw mode is changed
2680
- this.changeAnnotationDrawMode({ mode: 'simple_select' })
2681
- this.connectionEntry = {}
2682
- },
2683
2779
  disableUI: function (isUIDisabled) {
2684
2780
  if (isUIDisabled) {
2685
2781
  this.closeTooltip()
@@ -3481,6 +3577,13 @@ export default {
3481
3577
  }
3482
3578
  }
3483
3579
  }
3580
+ .treeControls {
3581
+ text-align: left;
3582
+ overflow: none;
3583
+ padding-top: 7px;
3584
+ padding-bottom: 16px;
3585
+ background: #ffffff;
3586
+ }
3484
3587
  </style>
3485
3588
 
3486
3589
  <style lang="scss">