@abi-software/map-side-bar 2.4.2-beta.13 → 2.4.2-beta.15

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/map-side-bar",
3
- "version": "2.4.2-beta.13",
3
+ "version": "2.4.2-beta.15",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "src/*",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@abi-software/gallery": "^1.1.2",
42
- "@abi-software/map-utilities": "^1.1.3-beta.10",
42
+ "@abi-software/map-utilities": "^1.1.3-beta.11",
43
43
  "@abi-software/svg-sprite": "^1.0.1",
44
44
  "@element-plus/icons-vue": "^2.3.1",
45
45
  "algoliasearch": "^4.10.5",
@@ -38,14 +38,6 @@
38
38
  <div class="block" v-if="resources.length">
39
39
  <external-resource-card :resources="resources"></external-resource-card>
40
40
  </div>
41
- <div class="block">
42
- <el-button
43
- class="button"
44
- @click="goToConnectivityGraph()"
45
- >
46
- Show connectivity graph
47
- </el-button>
48
- </div>
49
41
  </div>
50
42
  <div class="title-buttons">
51
43
  <el-popover
@@ -68,7 +60,28 @@
68
60
  <CopyToClipboard :content="updatedCopyContent" />
69
61
  </div>
70
62
  </div>
71
- <div class="content-container">
63
+
64
+ <div class="content-container population-display">
65
+ <div class="block attribute-title-container">
66
+ <span class="attribute-title">Population Display</span>
67
+ </div>
68
+ <div class="block buttons-row">
69
+ <el-button
70
+ :class="activeView === 'listView' ? 'button' : 'el-button-secondary'"
71
+ @click="switchConnectivityView('listView')"
72
+ >
73
+ List view
74
+ </el-button>
75
+ <el-button
76
+ :class="activeView === 'graphView' ? 'button' : 'el-button-secondary'"
77
+ @click="switchConnectivityView('graphView')"
78
+ >
79
+ Graph view
80
+ </el-button>
81
+ </div>
82
+ </div>
83
+
84
+ <div class="content-container" v-if="activeView === 'listView'">
72
85
  {{ entry.paths }}
73
86
  <div v-if="entry.origins && entry.origins.length > 0" class="block">
74
87
  <div class="attribute-title-container">
@@ -189,10 +202,8 @@
189
202
  </el-button>
190
203
  </div>
191
204
  </div>
192
- <div class="content-container">
193
- <div class="attribute-title-container">
194
- <span class="attribute-title">Connectivity Graph</span>
195
- </div>
205
+
206
+ <div class="content-container" v-if="activeView === 'graphView'">
196
207
  <connectivity-graph
197
208
  :entry="entry.featureId[0]"
198
209
  :mapServer="envVars.FLATMAPAPI_LOCATION"
@@ -273,6 +284,7 @@ export default {
273
284
  activeSpecies: undefined,
274
285
  pubmedSearchUrl: '',
275
286
  loading: false,
287
+ activeView: 'listView',
276
288
  facetList: [],
277
289
  showToolip: false,
278
290
  showDetails: false,
@@ -381,12 +393,16 @@ export default {
381
393
  // connected to flatmapvuer > moveMap(featureIds) function
382
394
  this.$emit('show-connectivity', featureIds);
383
395
  },
384
- goToConnectivityGraph: function () {
385
- const connectivityGraphRef = this.$refs.connectivityGraphRef;
386
- if (connectivityGraphRef && connectivityGraphRef.$el) {
387
- connectivityGraphRef.$el.scrollIntoView({
388
- behavior: 'smooth',
389
- });
396
+ switchConnectivityView: function (val) {
397
+ this.activeView = val;
398
+
399
+ if (val === 'graphView') {
400
+ const connectivityGraphRef = this.$refs.connectivityGraphRef;
401
+ if (connectivityGraphRef && connectivityGraphRef.$el) {
402
+ connectivityGraphRef.$el.scrollIntoView({
403
+ behavior: 'smooth',
404
+ });
405
+ }
390
406
  }
391
407
  },
392
408
  onTapNode: function (data) {
@@ -675,14 +691,40 @@ export default {
675
691
  font-size: 14px !important;
676
692
  background-color: $app-primary-color;
677
693
  color: #fff;
678
- & + .button {
679
- margin-top: 10px !important;
680
- }
694
+
681
695
  &:hover {
682
696
  color: #fff !important;
683
- background: #ac76c5 !important;
697
+ background-color: #ac76c5 !important;
684
698
  border: 1px solid #ac76c5 !important;
685
699
  }
700
+
701
+ & + .button {
702
+ margin-top: 10px !important;
703
+ }
704
+ }
705
+
706
+ .el-button-secondary {
707
+ border-color: transparent;
708
+ background-color: transparent;
709
+ }
710
+
711
+ .buttons-row {
712
+ text-align: right;
713
+
714
+ .el-button + .el-button {
715
+ margin-top: 0 !important;
716
+ margin-left: 10px !important;
717
+ }
718
+ }
719
+
720
+ .population-display {
721
+ display: flex;
722
+ flex: 1 1 auto !important;
723
+ flex-direction: row !important;
724
+ align-items: center;
725
+ justify-content: space-between;
726
+ border-bottom: 1px solid $app-primary-color;
727
+ padding-bottom: 0.5rem !important;
686
728
  }
687
729
 
688
730
  .tooltip-container {