@abi-software/flatmapvuer 0.2.3-beta-features-3 → 0.2.3-beta-features-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.
Files changed (108) hide show
  1. package/dist/flatmapvuer.common.js +255 -304
  2. package/dist/flatmapvuer.common.js.map +1 -1
  3. package/dist/flatmapvuer.css +1 -1
  4. package/dist/flatmapvuer.umd.js +255 -304
  5. package/dist/flatmapvuer.umd.js.map +1 -1
  6. package/dist/flatmapvuer.umd.min.js +1 -1
  7. package/dist/flatmapvuer.umd.min.js.map +1 -1
  8. package/{src/styles/purple/fonts/element-icons.woff → dist/fonts/element-icons.535877f5.woff} +0 -0
  9. package/{src/styles/purple/fonts/element-icons.ttf → dist/fonts/element-icons.732389de.ttf} +0 -0
  10. package/package-lock.json +941 -29
  11. package/package.json +3 -1
  12. package/src/App.vue +8 -5
  13. package/src/assets/_variables.scss +43 -0
  14. package/src/assets/styles.scss +7 -0
  15. package/src/components/FlatmapVuer.vue +656 -527
  16. package/src/components/MultiFlatmapVuer.vue +74 -63
  17. package/src/components/PubmedViewer.vue +23 -28
  18. package/src/components/Tooltip.vue +60 -67
  19. package/vue.config.js +8 -0
  20. package/src/styles/purple/alert.css +0 -1
  21. package/src/styles/purple/aside.css +0 -1
  22. package/src/styles/purple/autocomplete.css +0 -1
  23. package/src/styles/purple/avatar.css +0 -1
  24. package/src/styles/purple/backtop.css +0 -1
  25. package/src/styles/purple/badge.css +0 -1
  26. package/src/styles/purple/base.css +0 -1
  27. package/src/styles/purple/breadcrumb-item.css +0 -0
  28. package/src/styles/purple/breadcrumb.css +0 -1
  29. package/src/styles/purple/button-group.css +0 -0
  30. package/src/styles/purple/button.css +0 -1
  31. package/src/styles/purple/calendar.css +0 -1
  32. package/src/styles/purple/card.css +0 -1
  33. package/src/styles/purple/carousel-item.css +0 -1
  34. package/src/styles/purple/carousel.css +0 -1
  35. package/src/styles/purple/cascader-panel.css +0 -1
  36. package/src/styles/purple/cascader.css +0 -1
  37. package/src/styles/purple/checkbox-button.css +0 -0
  38. package/src/styles/purple/checkbox-group.css +0 -0
  39. package/src/styles/purple/checkbox.css +0 -1
  40. package/src/styles/purple/col.css +0 -1
  41. package/src/styles/purple/collapse-item.css +0 -0
  42. package/src/styles/purple/collapse.css +0 -1
  43. package/src/styles/purple/color-picker.css +0 -1
  44. package/src/styles/purple/container.css +0 -1
  45. package/src/styles/purple/date-picker.css +0 -1
  46. package/src/styles/purple/dialog.css +0 -1
  47. package/src/styles/purple/display.css +0 -1
  48. package/src/styles/purple/divider.css +0 -1
  49. package/src/styles/purple/drawer.css +0 -1
  50. package/src/styles/purple/dropdown-item.css +0 -0
  51. package/src/styles/purple/dropdown-menu.css +0 -0
  52. package/src/styles/purple/dropdown.css +0 -1
  53. package/src/styles/purple/footer.css +0 -1
  54. package/src/styles/purple/form-item.css +0 -0
  55. package/src/styles/purple/form.css +0 -1
  56. package/src/styles/purple/header.css +0 -1
  57. package/src/styles/purple/icon.css +0 -1
  58. package/src/styles/purple/image.css +0 -1
  59. package/src/styles/purple/index.css +0 -1
  60. package/src/styles/purple/infinite-scroll.css +0 -0
  61. package/src/styles/purple/infiniteScroll.css +0 -0
  62. package/src/styles/purple/input-number.css +0 -1
  63. package/src/styles/purple/input.css +0 -1
  64. package/src/styles/purple/link.css +0 -1
  65. package/src/styles/purple/loading.css +0 -1
  66. package/src/styles/purple/main.css +0 -1
  67. package/src/styles/purple/menu-item-group.css +0 -0
  68. package/src/styles/purple/menu-item.css +0 -0
  69. package/src/styles/purple/menu.css +0 -1
  70. package/src/styles/purple/message-box.css +0 -1
  71. package/src/styles/purple/message.css +0 -1
  72. package/src/styles/purple/notification.css +0 -1
  73. package/src/styles/purple/option-group.css +0 -1
  74. package/src/styles/purple/option.css +0 -1
  75. package/src/styles/purple/page-header.css +0 -1
  76. package/src/styles/purple/pagination.css +0 -1
  77. package/src/styles/purple/popconfirm.css +0 -1
  78. package/src/styles/purple/popover.css +0 -1
  79. package/src/styles/purple/popper.css +0 -1
  80. package/src/styles/purple/progress.css +0 -1
  81. package/src/styles/purple/radio-button.css +0 -1
  82. package/src/styles/purple/radio-group.css +0 -1
  83. package/src/styles/purple/radio.css +0 -1
  84. package/src/styles/purple/rate.css +0 -1
  85. package/src/styles/purple/reset.css +0 -1
  86. package/src/styles/purple/row.css +0 -1
  87. package/src/styles/purple/scrollbar.css +0 -1
  88. package/src/styles/purple/select-dropdown.css +0 -1
  89. package/src/styles/purple/select.css +0 -1
  90. package/src/styles/purple/slider.css +0 -1
  91. package/src/styles/purple/spinner.css +0 -1
  92. package/src/styles/purple/step.css +0 -1
  93. package/src/styles/purple/steps.css +0 -1
  94. package/src/styles/purple/submenu.css +0 -0
  95. package/src/styles/purple/switch.css +0 -1
  96. package/src/styles/purple/tab-pane.css +0 -0
  97. package/src/styles/purple/table-column.css +0 -1
  98. package/src/styles/purple/table.css +0 -1
  99. package/src/styles/purple/tabs.css +0 -1
  100. package/src/styles/purple/tag.css +0 -1
  101. package/src/styles/purple/time-picker.css +0 -1
  102. package/src/styles/purple/time-select.css +0 -1
  103. package/src/styles/purple/timeline-item.css +0 -1
  104. package/src/styles/purple/timeline.css +0 -1
  105. package/src/styles/purple/tooltip.css +0 -1
  106. package/src/styles/purple/transfer.css +0 -1
  107. package/src/styles/purple/tree.css +0 -1
  108. package/src/styles/purple/upload.css +0 -1
@@ -1,59 +1,135 @@
1
1
  <template>
2
- <div class="flatmap-container"
3
- v-loading="loading"
4
- element-loading-text="Loading..."
5
- element-loading-spinner="el-icon-loading"
6
- element-loading-background="rgba(0, 0, 0, 0.3)">
7
- <SvgSpriteColor/>
2
+ <div
3
+ class="flatmap-container"
4
+ v-loading="loading"
5
+ element-loading-text="Loading..."
6
+ element-loading-spinner="el-icon-loading"
7
+ element-loading-background="rgba(0, 0, 0, 0.3)"
8
+ >
9
+ <SvgSpriteColor />
8
10
  <div style="height:100%;width:100%;position:relative;overflow-y:none">
9
11
  <div style="height:100%;width:100%;" ref="display"></div>
10
- <el-popover :content="warningMessage" placement="right"
11
- v-if="displayWarning" :appendToBody=false trigger="manual" popper-class="warning-popper right-popper" v-model="hoverVisibilities[6].value"
12
- ref="warningPopover">
13
- </el-popover>
14
- <i class="el-icon-warning warning-icon" v-if="displayWarning"
15
- @mouseover="showToolitip(6)" @mouseout="hideToolitip(6)"
16
- v-popover:warningPopover>
12
+ <el-popover
13
+ :content="warningMessage"
14
+ placement="right"
15
+ v-if="displayWarning"
16
+ :appendToBody="false"
17
+ trigger="manual"
18
+ popper-class="warning-popper flatmap-popper right-popper"
19
+ v-model="hoverVisibilities[6].value"
20
+ ref="warningPopover"
21
+ ></el-popover>
22
+ <i
23
+ class="el-icon-warning warning-icon"
24
+ v-if="displayWarning"
25
+ @mouseover="showToolitip(6)"
26
+ @mouseout="hideToolitip(6)"
27
+ v-popover:warningPopover
28
+ >
17
29
  <span class="warning-text">Beta</span>
18
30
  </i>
19
31
  <div class="bottom-right-control">
20
- <el-popover content="Zoom in" placement="left"
21
- :appendToBody=false trigger="manual" popper-class="flatmap-popper left-popper" v-model="hoverVisibilities[0].value">
22
- <SvgIcon icon="zoomIn" class="icon-button zoomIn" slot="reference" @click.native="zoomIn()"
23
- @mouseover.native="showToolitip(0)" @mouseout.native="hideToolitip(0)"/>
32
+ <el-popover
33
+ content="Zoom in"
34
+ placement="left"
35
+ :appendToBody="false"
36
+ trigger="manual"
37
+ popper-class="flatmap-popper left-popper"
38
+ v-model="hoverVisibilities[0].value"
39
+ >
40
+ <SvgIcon
41
+ icon="zoomIn"
42
+ class="icon-button zoomIn"
43
+ slot="reference"
44
+ @click.native="zoomIn()"
45
+ @mouseover.native="showToolitip(0)"
46
+ @mouseout.native="hideToolitip(0)"
47
+ />
24
48
  </el-popover>
25
- <el-popover content="Zoom out" placement="top-end"
26
- :appendToBody=false trigger="manual" popper-class="flatmap-popper popper-zoomout" v-model="hoverVisibilities[1].value">
27
- <SvgIcon icon="zoomOut" class="icon-button zoomOut" slot="reference" @click.native="zoomOut()"
28
- @mouseover.native="showToolitip(1)" @mouseout.native="hideToolitip(1)"/>
49
+ <el-popover
50
+ content="Zoom out"
51
+ placement="top-end"
52
+ :appendToBody="false"
53
+ trigger="manual"
54
+ popper-class="flatmap-popper popper-zoomout"
55
+ v-model="hoverVisibilities[1].value"
56
+ >
57
+ <SvgIcon
58
+ icon="zoomOut"
59
+ class="icon-button zoomOut"
60
+ slot="reference"
61
+ @click.native="zoomOut()"
62
+ @mouseover.native="showToolitip(1)"
63
+ @mouseout.native="hideToolitip(1)"
64
+ />
29
65
  </el-popover>
30
- <el-popover content="Reset" placement="top"
31
- :appendToBody=false trigger="manual" popper-class="flatmap-popper" v-model="hoverVisibilities[2].value">
32
- <SvgIcon icon="resetZoom" class="icon-button resetView" slot="reference" @click.native="resetView()"
33
- @mouseover.native="showToolitip(2)" @mouseout.native="hideToolitip(2)"/>
66
+ <el-popover
67
+ content="Reset"
68
+ placement="top"
69
+ :appendToBody="false"
70
+ trigger="manual"
71
+ popper-class="flatmap-popper"
72
+ v-model="hoverVisibilities[2].value"
73
+ >
74
+ <SvgIcon
75
+ icon="resetZoom"
76
+ class="icon-button resetView"
77
+ slot="reference"
78
+ @click.native="resetView()"
79
+ @mouseover.native="showToolitip(2)"
80
+ @mouseout.native="hideToolitip(2)"
81
+ />
34
82
  </el-popover>
35
83
  </div>
36
- <el-popover content="Change pathway visibility" placement="right"
37
- :appendToBody=false trigger="manual" popper-class="flatmap-popper right-popper" v-model="hoverVisibilities[4].value" ref="checkBoxPopover"/>
84
+ <el-popover
85
+ content="Change pathway visibility"
86
+ placement="right"
87
+ :appendToBody="false"
88
+ trigger="manual"
89
+ popper-class="flatmap-popper right-popper"
90
+ v-model="hoverVisibilities[4].value"
91
+ ref="checkBoxPopover"
92
+ />
38
93
  <div class="pathway-location" :class="{ open: drawerOpen, close: !drawerOpen }">
39
- <div class="pathway-container" v-if="pathways.length > 0 && pathControls"
40
- v-popover:checkBoxPopover>
41
- <el-popover content="Find these markers for data" placement="right"
42
- :appendToBody=false trigger="manual" popper-class="flatmap-popper popper-bump-right right-popper" v-model="hoverVisibilities[5].value" ref="markerPopover">
43
- </el-popover>
44
- <div v-show="hoverVisibilities[5].value" class="flatmap-marker-help" v-html="flatmapMarker" v-popover:markerPopover></div>
94
+ <div
95
+ class="pathway-container"
96
+ v-if="pathways.length > 0 && pathControls"
97
+ v-popover:checkBoxPopover
98
+ >
99
+ <el-popover
100
+ content="Find these markers for data"
101
+ placement="right"
102
+ :appendToBody="false"
103
+ trigger="manual"
104
+ popper-class="flatmap-popper popper-bump-right right-popper"
105
+ v-model="hoverVisibilities[5].value"
106
+ ref="markerPopover"
107
+ ></el-popover>
108
+ <div
109
+ v-show="hoverVisibilities[5].value"
110
+ class="flatmap-marker-help"
111
+ v-html="flatmapMarker"
112
+ v-popover:markerPopover
113
+ ></div>
45
114
  <el-row>
46
115
  <el-col :span="12">
47
- <div class="pathways-display-text">
48
- Pathways
49
- </div>
116
+ <div class="pathways-display-text">Pathways</div>
50
117
  </el-col>
51
118
  <el-col :span="12">
52
- <el-checkbox class="all-checkbox" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">Display all</el-checkbox>
119
+ <el-checkbox
120
+ class="all-checkbox"
121
+ :indeterminate="isIndeterminate"
122
+ v-model="checkAll"
123
+ @change="handleCheckAllChange"
124
+ >Display all</el-checkbox>
53
125
  </el-col>
54
126
  </el-row>
55
- <el-checkbox-group v-model="checkedItems" size="small"
56
- class="checkbox-group" @change="handleCheckedItemsChange">
127
+ <el-checkbox-group
128
+ v-model="checkedItems"
129
+ size="small"
130
+ class="checkbox-group"
131
+ @change="handleCheckedItemsChange"
132
+ >
57
133
  <div class="checkbox-group-inner">
58
134
  <el-row v-for="item in pathways" :key="item.type" :label="item.type">
59
135
  <div class="checkbox-container">
@@ -62,13 +138,20 @@
62
138
  :label="item.type"
63
139
  @change="visibilityToggle()"
64
140
  :checked="true"
65
- ><div class="path-visual" :class="item.type"></div>{{item.label}}</el-checkbox>
141
+ >
142
+ <div class="path-visual" :class="item.type"></div>
143
+ {{item.label}}
144
+ </el-checkbox>
66
145
  </div>
67
146
  </el-row>
68
147
  </div>
69
148
  </el-checkbox-group>
70
149
  </div>
71
- <div @click="toggleDrawer" class="drawer-button" :class="{ open: drawerOpen, close: !drawerOpen }">
150
+ <div
151
+ @click="toggleDrawer"
152
+ class="drawer-button"
153
+ :class="{ open: drawerOpen, close: !drawerOpen }"
154
+ >
72
155
  <i class="el-icon-arrow-left"></i>
73
156
  </div>
74
157
  </div>
@@ -76,49 +159,60 @@
76
159
  ref="backgroundPopover"
77
160
  placement="top-start"
78
161
  width="175"
79
- :appendToBody=false
162
+ :appendToBody="false"
80
163
  trigger="click"
81
- popper-class="background-popper">
82
- <el-row class="backgroundText">
83
- Organs display
84
- </el-row>
85
- <el-row class="backgroundControl" >
86
- <el-radio-group v-model="colourRadio" class="flatmap-radio"
87
- @change="setColour">
164
+ popper-class="background-popper"
165
+ >
166
+ <el-row class="backgroundText">Organs display</el-row>
167
+ <el-row class="backgroundControl">
168
+ <el-radio-group v-model="colourRadio" class="flatmap-radio" @change="setColour">
88
169
  <el-radio :label="true">Colour</el-radio>
89
170
  <el-radio :label="false">Greyscale</el-radio>
90
171
  </el-radio-group>
91
172
  </el-row>
92
- <el-row class="backgroundSpacer">
93
- </el-row>
94
- <el-row class="backgroundText">
95
- Outlines display
96
- </el-row>
97
- <el-row class="backgroundControl" >
98
- <el-radio-group v-model="outlinesRadio" class="flatmap-radio"
99
- @change="setOutlines">
173
+ <el-row class="backgroundSpacer"></el-row>
174
+ <el-row class="backgroundText">Outlines display</el-row>
175
+ <el-row class="backgroundControl">
176
+ <el-radio-group v-model="outlinesRadio" class="flatmap-radio" @change="setOutlines">
100
177
  <el-radio :label="true">Show</el-radio>
101
178
  <el-radio :label="false">Hide</el-radio>
102
179
  </el-radio-group>
103
180
  </el-row>
104
- <el-row class="backgroundSpacer">
105
- </el-row>
106
- <el-row class="backgroundText">
107
- Change background
108
- </el-row>
109
- <el-row class="backgroundControl" >
110
- <div v-for="item in availableBackground" :key="item"
111
- :class="['backgroundChoice', item, item == currentBackground ? 'active' :'']"
112
- @click="backgroundChangeCallback(item)"/>
181
+ <el-row class="backgroundSpacer"></el-row>
182
+ <el-row class="backgroundText">Change background</el-row>
183
+ <el-row class="backgroundControl">
184
+ <div
185
+ v-for="item in availableBackground"
186
+ :key="item"
187
+ :class="['backgroundChoice', item, item == currentBackground ? 'active' :'']"
188
+ @click="backgroundChangeCallback(item)"
189
+ />
113
190
  </el-row>
114
191
  </el-popover>
115
- <el-popover content="Change background color" placement="right" v-model="hoverVisibilities[3].value"
116
- :appendToBody=false trigger="manual" popper-class="flatmap-popper right-popper">
117
- <SvgIcon v-popover:backgroundPopover icon="changeBckgd" class="icon-button background-colour"
118
- :class="{ open: drawerOpen, close: !drawerOpen }" slot="reference"
119
- @mouseover.native="showToolitip(3)" @mouseout.native="hideToolitip(3)"/>
192
+ <el-popover
193
+ content="Change background color"
194
+ placement="right"
195
+ v-model="hoverVisibilities[3].value"
196
+ :appendToBody="false"
197
+ trigger="manual"
198
+ popper-class="flatmap-popper right-popper"
199
+ >
200
+ <SvgIcon
201
+ v-popover:backgroundPopover
202
+ icon="changeBckgd"
203
+ class="icon-button background-colour"
204
+ :class="{ open: drawerOpen, close: !drawerOpen }"
205
+ slot="reference"
206
+ @mouseover.native="showToolitip(3)"
207
+ @mouseout.native="hideToolitip(3)"
208
+ />
120
209
  </el-popover>
121
- <Tooltip ref="tooltip" class="tooltip" :content="tooltipContent" @resource-selected="resourceSelected"/>
210
+ <Tooltip
211
+ ref="tooltip"
212
+ class="tooltip"
213
+ :content="tooltipContent"
214
+ @resource-selected="resourceSelected"
215
+ />
122
216
  </div>
123
217
  </div>
124
218
  </template>
@@ -126,8 +220,8 @@
126
220
  <script>
127
221
  /* eslint-disable no-alert, no-console */
128
222
  import Vue from "vue";
129
- import Tooltip from './Tooltip'
130
- import { SvgIcon, SvgSpriteColor} from '@abi-software/svg-sprite'
223
+ import Tooltip from "./Tooltip";
224
+ import { SvgIcon, SvgSpriteColor } from "@abi-software/svg-sprite";
131
225
  import {
132
226
  Checkbox,
133
227
  CheckboxGroup,
@@ -148,14 +242,13 @@ Vue.use(Loading.directive);
148
242
  Vue.use(Radio);
149
243
  Vue.use(RadioGroup);
150
244
  Vue.use(Row);
151
- const ResizeSensor = require('css-element-queries/src/ResizeSensor');
245
+ const ResizeSensor = require("css-element-queries/src/ResizeSensor");
152
246
 
153
247
  const mapResize = map => {
154
248
  return () => {
155
- if (map)
156
- map.resize();
157
- }
158
- }
249
+ if (map) map.resize();
250
+ };
251
+ };
159
252
 
160
253
  export default {
161
254
  name: "FlatmapVuer",
@@ -172,10 +265,10 @@ export default {
172
265
  backgroundChangeCallback: function(colour) {
173
266
  this.currentBackground = colour;
174
267
  if (this.mapImp) {
175
- this.mapImp.setBackgroundColour(this.currentBackground, 1 );
268
+ this.mapImp.setBackgroundColour(this.currentBackground, 1);
176
269
  }
177
270
  },
178
- toggleDrawer: function () {
271
+ toggleDrawer: function() {
179
272
  this.drawerOpen = !this.drawerOpen;
180
273
  },
181
274
  /**
@@ -184,7 +277,7 @@ export default {
184
277
  setColour: function(flag) {
185
278
  this.colourRadio = flag;
186
279
  if (this.mapImp) {
187
- this.mapImp.setColour({colour: flag, outline: this.outlinesRadio});
280
+ this.mapImp.setColour({ colour: flag, outline: this.outlinesRadio });
188
281
  }
189
282
  },
190
283
  /**
@@ -193,7 +286,7 @@ export default {
193
286
  setOutlines: function(flag) {
194
287
  this.outlineRadio = flag;
195
288
  if (this.mapImp) {
196
- this.mapImp.setColour({colour: this.colourRadio, outline: flag});
289
+ this.mapImp.setColour({ colour: this.colourRadio, outline: flag });
197
290
  }
198
291
  },
199
292
  /**
@@ -234,7 +327,8 @@ export default {
234
327
  handleCheckedItemsChange: function(value) {
235
328
  let checkedCount = value.length;
236
329
  this.checkAll = checkedCount === this.pathways.length;
237
- this.isIndeterminate = checkedCount > 0 && checkedCount < this.pathways.length;
330
+ this.isIndeterminate =
331
+ checkedCount > 0 && checkedCount < this.pathways.length;
238
332
  },
239
333
  handleCheckAllChange(val) {
240
334
  this.checkedItems = val ? this.pathways.map(a => a.type) : [];
@@ -244,93 +338,114 @@ export default {
244
338
  }
245
339
  },
246
340
  eventCallback: function() {
247
-
248
341
  return (eventType, feature, ...args) => {
249
342
  const label = feature.label;
250
- const resource = [ feature.models ];
343
+ const resource = [feature.models];
251
344
  const taxonomy = this.entry;
252
- const data = { dataset: feature.dataset, taxonomy: taxonomy, resource: resource, label: label,
253
- feature: feature, userData: args, eventType: eventType};
345
+ const data = {
346
+ dataset: feature.dataset,
347
+ taxonomy: taxonomy,
348
+ resource: resource,
349
+ label: label,
350
+ feature: feature,
351
+ userData: args,
352
+ eventType: eventType
353
+ };
254
354
  // Disable the nueron pop up for now.
255
355
  if (feature && feature.type !== "marker")
256
- this.checkAndCreatePopups(data)
356
+ this.checkAndCreatePopups(data);
257
357
  this.$emit("resource-selected", data);
258
- }
358
+ };
259
359
  },
260
360
  // checkNeuronClicked shows a neuron path pop up if a path was recently clicked
261
- checkAndCreatePopups: function(data){
262
- if (data.eventType == 'click' && this.createTooltipFromNeuronCuration(data)) {
263
- this.mapImp.showPopup(this.mapImp.modelFeatureIds(data.resource[0])[0],this.$refs.tooltip.$el,
264
- {className: "flatmap-tooltip-dialog"})
265
- this.popUpCssHack()
361
+ checkAndCreatePopups: function(data) {
362
+ if (
363
+ data.eventType == "click" &&
364
+ this.createTooltipFromNeuronCuration(data)
365
+ ) {
366
+ this.mapImp.showPopup(
367
+ this.mapImp.modelFeatureIds(data.resource[0])[0],
368
+ this.$refs.tooltip.$el,
369
+ { className: "flatmap-tooltip-dialog" }
370
+ );
371
+ this.popUpCssHack();
266
372
  }
267
373
  },
268
- popUpCssHack: function(){
374
+ popUpCssHack: function() {
269
375
  // Below is a hack to remove flatmap tooltips while popup is open
270
- let ftooltip = document.querySelector('.flatmap-tooltip-popup')
271
- if (ftooltip) ftooltip.style.display = 'none'
272
- document.querySelector('.mapboxgl-popup-close-button').style.display = 'block'
273
- this.$refs.tooltip.$el.style.display = 'flex'
274
- document.querySelector('.mapboxgl-popup-close-button').onclick = ()=>{
275
- document.querySelector('.flatmap-tooltip-popup').style.display = 'block'
276
- }
376
+ let ftooltip = document.querySelector(".flatmap-tooltip-popup");
377
+ if (ftooltip) ftooltip.style.display = "none";
378
+ document.querySelector(".mapboxgl-popup-close-button").style.display =
379
+ "block";
380
+ this.$refs.tooltip.$el.style.display = "flex";
381
+ document.querySelector(".mapboxgl-popup-close-button").onclick = () => {
382
+ document.querySelector(".flatmap-tooltip-popup").style.display =
383
+ "block";
384
+ };
277
385
  },
278
- resourceSelected: function(action){
279
- this.$emit("resource-selected", action)
386
+ resourceSelected: function(action) {
387
+ this.$emit("resource-selected", action);
280
388
  },
281
- createTooltipFromNeuronCuration: function(data){
282
- const feature = data.resource[0]
389
+ createTooltipFromNeuronCuration: function(data) {
390
+ const feature = data.resource[0];
283
391
  let content = {
284
- title: undefined, components: undefined, start: undefined, distribution: undefined, actions: []
285
- }
286
-
287
- let foundAnnotations = false
288
- this.tooltipVisible = false
392
+ title: undefined,
393
+ components: undefined,
394
+ start: undefined,
395
+ distribution: undefined,
396
+ actions: []
397
+ };
398
+
399
+ let foundAnnotations = false;
400
+ this.tooltipVisible = false;
289
401
 
290
402
  // neural data check
291
- if (feature){
292
- if (feature.includes('ilxtr:neuron')){
293
- foundAnnotations = true
294
- this.tooltipVisible = true
295
- this.tooltipContent = content
296
- this.tooltipContent.uberon = feature
297
- this.tooltipContent.title = data.label
298
- this.tooltipContent.featureId = feature
403
+ if (feature) {
404
+ if (feature.includes("ilxtr:neuron")) {
405
+ foundAnnotations = true;
406
+ this.tooltipVisible = true;
407
+ this.tooltipContent = content;
408
+ this.tooltipContent.uberon = feature;
409
+ this.tooltipContent.title = data.label;
410
+ this.tooltipContent.featureId = feature;
299
411
  this.tooltipContent.actions.push({
300
- title: 'Search for dataset',
301
- label: 'Neuron Datasets',
302
- resource: feature.split(':')[1],
303
- type: 'Neuron Search',
304
- nervePath: true,
305
- })
412
+ title: "Search for dataset",
413
+ label: "Neuron Datasets",
414
+ resource: feature.split(":")[1],
415
+ type: "Neuron Search",
416
+ nervePath: true
417
+ });
306
418
  }
307
419
  }
308
420
  // annotated with datset check
309
- if (data.dataset){
310
- foundAnnotations = true
311
- this.tooltipVisible = true
312
- this.tooltipContent = content
313
- this.tooltipContent.uberon = feature
314
- this.tooltipContent.title = data.label
421
+ if (data.dataset) {
422
+ foundAnnotations = true;
423
+ this.tooltipVisible = true;
424
+ this.tooltipContent = content;
425
+ this.tooltipContent.uberon = feature;
426
+ this.tooltipContent.title = data.label;
315
427
  this.tooltipContent.actions.push({
316
428
  title: "View dataset",
317
429
  resource: data.dataset,
318
430
  type: "URL",
319
- nervePath: false,
320
- })
431
+ nervePath: false
432
+ });
433
+ }
434
+
435
+ if (foundAnnotations) {
436
+ return true;
437
+ } else {
438
+ return false;
321
439
  }
322
-
323
- if(foundAnnotations) { return true } else { return false }
324
440
  },
325
- // Keeping this as an API
441
+ // Keeping this as an API
326
442
  showPopup: function(featureId, node, options) {
327
443
  let myOptions = options;
328
444
  if (this.mapImp) {
329
445
  if (myOptions) {
330
- if (!myOptions.className)
331
- myOptions.className = "flatmapvuer-popover";
446
+ if (!myOptions.className) myOptions.className = "flatmapvuer-popover";
332
447
  } else {
333
- myOptions = {className: "flatmapvuer-popover"};
448
+ myOptions = { className: "flatmapvuer-popover" };
334
449
  }
335
450
  this.mapImp.showPopup(featureId, node, myOptions);
336
451
  }
@@ -340,50 +455,57 @@ export default {
340
455
  this.mapImp.showMarkerPopup(featureId, node, options);
341
456
  }
342
457
  },
343
- setHelpMode: function(helpMode){
344
- if (helpMode){
458
+ setHelpMode: function(helpMode) {
459
+ if (helpMode) {
345
460
  this.inHelp = true;
346
- this.hoverVisibilities.forEach( (item) =>{
461
+ this.hoverVisibilities.forEach(item => {
347
462
  item.value = true;
348
463
  });
349
464
  this.openFlatmapHelpPopup();
350
465
  } else {
351
466
  this.inHelp = false;
352
- this.hoverVisibilities.forEach( (item) =>{
467
+ this.hoverVisibilities.forEach(item => {
353
468
  item.value = false;
354
469
  });
355
470
  this.closeFlatmapHelpPopup();
356
471
  }
357
472
  },
358
- showToolitip: function(tooltipNumber){
359
- if (!this.inHelp){
360
- this.tooltipWait = setTimeout( ()=>{
361
- this.hoverVisibilities[tooltipNumber].value = true}, 500);
473
+ showToolitip: function(tooltipNumber) {
474
+ if (!this.inHelp) {
475
+ this.tooltipWait = setTimeout(() => {
476
+ this.hoverVisibilities[tooltipNumber].value = true;
477
+ }, 500);
362
478
  }
363
479
  },
364
- hideToolitip: function(tooltipNumber){
365
- if (!this.inHelp){
480
+ hideToolitip: function(tooltipNumber) {
481
+ if (!this.inHelp) {
366
482
  this.hoverVisibilities[tooltipNumber].value = false;
367
483
  clearTimeout(this.tooltipWait);
368
484
  }
369
485
  },
370
- openFlatmapHelpPopup: function(){
486
+ openFlatmapHelpPopup: function() {
371
487
  if (this.mapImp) {
372
- let heartId = this.mapImp.featureIdsForModel('UBERON:0000948')[0];
373
- const elm = 'Click for more information';
374
- this.mapImp.showPopup(heartId, elm, {anchor: "top", className: "flatmap-popup-popper"});
488
+ let heartId = this.mapImp.featureIdsForModel("UBERON:0000948")[0];
489
+ const elm = "Click for more information";
490
+ this.mapImp.showPopup(heartId, elm, {
491
+ anchor: "top",
492
+ className: "flatmap-popup-popper"
493
+ });
375
494
  }
376
495
  },
377
- closeFlatmapHelpPopup: function(){
378
- this.$el.querySelectorAll('.mapboxgl-popup-close-button').forEach((item) => {item.click()});
496
+ closeFlatmapHelpPopup: function() {
497
+ this.$el
498
+ .querySelectorAll(".mapboxgl-popup-close-button")
499
+ .forEach(item => {
500
+ item.click();
501
+ });
379
502
  },
380
503
  getLabels: function() {
381
504
  let labels = [];
382
505
  if (this.mapImp) {
383
506
  let annotations = this.mapImp.annotations;
384
507
  for (let value of annotations.values()) {
385
- if (value.label)
386
- labels.push(value.label);
508
+ if (value.label) labels.push(value.label);
387
509
  }
388
510
  return Array.from(new Set(labels));
389
511
  }
@@ -392,8 +514,8 @@ export default {
392
514
  if (this.mapImp) {
393
515
  let state = {
394
516
  entry: this.entry,
395
- viewport: this.mapImp.getState(),
396
- }
517
+ viewport: this.mapImp.getState()
518
+ };
397
519
  return state;
398
520
  }
399
521
  return undefined;
@@ -418,9 +540,10 @@ export default {
418
540
  minimap = { position: "top-right" };
419
541
  }
420
542
  let entry = this.entry;
421
- if (state && state.entry)
422
- entry = state.entry;
423
- let promise1 = this.mapManager.loadMap(entry, this.$refs.display,
543
+ if (state && state.entry) entry = state.entry;
544
+ let promise1 = this.mapManager.loadMap(
545
+ entry,
546
+ this.$refs.display,
424
547
  this.eventCallback(),
425
548
  {
426
549
  //fullscreenControl: false,
@@ -432,10 +555,14 @@ export default {
432
555
  searchable: this.searchable,
433
556
  tooltips: this.tooltips,
434
557
  minimap: minimap
435
- });
558
+ }
559
+ );
436
560
  promise1.then(returnedObject => {
437
561
  this.mapImp = returnedObject;
438
- this.sensor = new ResizeSensor(this.$refs.display, mapResize(this.mapImp));
562
+ this.sensor = new ResizeSensor(
563
+ this.$refs.display,
564
+ mapResize(this.mapImp)
565
+ );
439
566
  this.mapImp.setBackgroundOpacity(1);
440
567
  this.backgroundChangeCallback(this.currentBackground);
441
568
  this.pathways = this.mapImp.pathTypes();
@@ -447,8 +574,7 @@ export default {
447
574
  this.mapImp.setState(state.viewport);
448
575
  });
449
576
  } else if (state) {
450
- if (this.entry == state.entry)
451
- this._viewportToBeSet = state.viewport;
577
+ if (this.entry == state.entry) this._viewportToBeSet = state.viewport;
452
578
  }
453
579
  },
454
580
  /**
@@ -458,13 +584,11 @@ export default {
458
584
  if (this.mapImp) {
459
585
  if (term === undefined || term === "") {
460
586
  this.mapImp.clearSearchResults();
461
- }
462
- else {
587
+ } else {
463
588
  let searchResults = this.mapImp.search(term);
464
589
  if (searchResults && searchResults.__featureIds.length > 0)
465
590
  this.mapImp.showSearchResults(searchResults);
466
- else
467
- this.mapImp.clearSearchResults();
591
+ else this.mapImp.clearSearchResults();
468
592
  }
469
593
  }
470
594
  }
@@ -473,7 +597,7 @@ export default {
473
597
  entry: String,
474
598
  featureInfo: {
475
599
  type: Boolean,
476
- default: false,
600
+ default: false
477
601
  },
478
602
  minZoom: {
479
603
  type: Number,
@@ -485,11 +609,11 @@ export default {
485
609
  },
486
610
  searchable: {
487
611
  type: Boolean,
488
- default: false,
612
+ default: false
489
613
  },
490
614
  tooltips: {
491
615
  type: Boolean,
492
- default: true,
616
+ default: true
493
617
  },
494
618
  helpMode: {
495
619
  type: Boolean,
@@ -497,7 +621,7 @@ export default {
497
621
  },
498
622
  renderAtMounted: {
499
623
  type: Boolean,
500
- default: true,
624
+ default: true
501
625
  },
502
626
  displayWarning: {
503
627
  type: Boolean,
@@ -516,7 +640,7 @@ export default {
516
640
  */
517
641
  state: {
518
642
  type: Object,
519
- default: undefined,
643
+ default: undefined
520
644
  },
521
645
  /**
522
646
  * Specify the endpoint of the flatmap server.
@@ -524,7 +648,7 @@ export default {
524
648
  flatmapAPI: {
525
649
  type: String,
526
650
  default: "https://mapcore-demo.org/flatmaps/"
527
- },
651
+ }
528
652
  },
529
653
  data: function() {
530
654
  return {
@@ -532,11 +656,18 @@ export default {
532
656
  pathways: [],
533
657
  isIndeterminate: false,
534
658
  checkAll: true,
535
- hoverVisibilities: [{value: false}, {value: false}, {value: false},
536
- {value: false}, {value: false}, {value: false}, {value: false}],
659
+ hoverVisibilities: [
660
+ { value: false },
661
+ { value: false },
662
+ { value: false },
663
+ { value: false },
664
+ { value: false },
665
+ { value: false },
666
+ { value: false }
667
+ ],
537
668
  inHelp: false,
538
- currentBackground: 'white',
539
- availableBackground: ['white', 'lightskyblue', 'black' ],
669
+ currentBackground: "white",
670
+ availableBackground: ["white", "lightskyblue", "black"],
540
671
  loading: false,
541
672
  flatmapMarker: flatmapMarker,
542
673
  drawerOpen: true,
@@ -547,10 +678,9 @@ export default {
547
678
  },
548
679
  watch: {
549
680
  entry: function() {
550
- if (!this.state)
551
- this.createFlatmap();
681
+ if (!this.state) this.createFlatmap();
552
682
  },
553
- helpMode: function(val){
683
+ helpMode: function(val) {
554
684
  this.setHelpMode(val);
555
685
  },
556
686
  state: {
@@ -558,87 +688,85 @@ export default {
558
688
  this.setState(state);
559
689
  },
560
690
  immediate: true,
561
- deep: true,
691
+ deep: true
562
692
  }
563
693
  },
564
694
  mounted: function() {
565
695
  const flatmap = require("@abi-software/flatmap-viewer");
566
696
  this.mapManager = new flatmap.MapManager(this.flatmapAPI);
567
- if (this.renderAtMounted)
568
- this.createFlatmap();
697
+ if (this.renderAtMounted) this.createFlatmap();
569
698
  }
570
699
  };
571
700
  </script>
572
701
 
573
702
  <!-- Add "scoped" attribute to limit CSS to this component only -->
574
- <style scoped>
703
+ <style scoped lang="scss">
704
+ @import "~element-ui/packages/theme-chalk/src/button";
705
+ @import "~element-ui/packages/theme-chalk/src/checkbox";
706
+ @import "~element-ui/packages/theme-chalk/src/checkbox-group";
707
+ @import "~element-ui/packages/theme-chalk/src/loading";
708
+ @import "~element-ui/packages/theme-chalk/src/row";
709
+
575
710
  .warning-icon {
576
711
  position: absolute;
577
712
  top: 90px;
578
713
  left: 37px;
579
714
  text-align: left;
580
715
  font-size: 25px;
581
- color: #ff8400;
582
- }
583
- .warning-icon:hover {
584
- cursor: pointer;
585
- }
586
- >>> .warning-popper {
587
- padding:9px 10px;
588
- min-width:150px;
589
- max-width: 400px;
590
- font-size:12px;
591
- color: #fff;
592
- word-break: keep-all;
593
- background-color: #ff8400;
594
- }
595
- >>> .warning-popper.right-popper .popper__arrow::after{
596
- border-right-color: #ff8400 !important;
716
+ color: $warning;
717
+
718
+ &:hover {
719
+ cursor: pointer;
720
+ }
597
721
  }
598
722
 
599
- .warning-text{
723
+ .warning-text {
600
724
  font-size: 15px;
601
- vertical-align:5px;
725
+ vertical-align: 5px;
602
726
  }
603
727
 
604
728
  .path-visual {
605
729
  margin: 3px 0;
606
730
  height: 3px;
607
- width:25px;
731
+ width: 25px;
608
732
  margin-right: 5px;
609
733
  display: inline-block;
610
- }
611
-
612
- .path-visual.cns {
613
- background:#9b1fc1;
614
- }
615
-
616
- .path-visual.lcn {
617
- background:#f19e38;
618
- }
619
-
620
- .path-visual.para-pre {
621
- background:#3f8f4a;
622
- }
623
-
624
- .path-visual.para-post {
625
- background:repeating-linear-gradient(90deg,#3f8f4a,#3f8f4a 6px,transparent 0,transparent 9px);
626
- }
627
-
628
- .path-visual.sensory {
629
- background:#2a62f6;
630
- }
631
-
632
- .path-visual.somatic {
633
- background:#98561d;
634
- }
635
-
636
- .path-visual.symp-pre {
637
- background: #ea3423;
638
- }
639
-
640
- .path-visual.symp-post {
641
- background: repeating-linear-gradient(90deg,#ea3423,#ea3423 6px,transparent 0,transparent 9px);
734
+ &.cns {
735
+ background: #9b1fc1;
736
+ }
737
+ &.lcn {
738
+ background: #f19e38;
739
+ }
740
+ &.para-pre {
741
+ background: #3f8f4a;
742
+ }
743
+ &.para-post {
744
+ background: repeating-linear-gradient(
745
+ 90deg,
746
+ #3f8f4a,
747
+ #3f8f4a 6px,
748
+ transparent 0,
749
+ transparent 9px
750
+ );
751
+ }
752
+ &.sensory {
753
+ background: #2a62f6;
754
+ }
755
+ &.somatic {
756
+ background: #98561d;
757
+ }
758
+ &.symp-pre {
759
+ background: #ea3423;
760
+ }
761
+ &.symp-post {
762
+ background: repeating-linear-gradient(
763
+ 90deg,
764
+ #ea3423,
765
+ #ea3423 6px,
766
+ transparent 0,
767
+ transparent 9px
768
+ );
769
+ }
642
770
  }
643
771
 
644
772
  .flatmap-container {
@@ -650,12 +778,12 @@ export default {
650
778
  position: absolute;
651
779
  bottom: 0px;
652
780
  transition: all 1s ease;
653
- }
654
- .pathway-location.open {
655
- left: 0px;
656
- }
657
- .pathway-location.close {
658
- left: -298px;
781
+ &.open {
782
+ left: 0px;
783
+ }
784
+ &.close {
785
+ left: -298px;
786
+ }
659
787
  }
660
788
 
661
789
  .pathway-container {
@@ -666,9 +794,9 @@ export default {
666
794
  text-align: left;
667
795
  overflow: auto;
668
796
  border: 1px solid rgb(220, 223, 230);
669
- padding-top:7px;
670
- padding-bottom:16px;
671
- background:#ffffff;
797
+ padding-top: 7px;
798
+ padding-bottom: 16px;
799
+ background: #ffffff;
672
800
  }
673
801
 
674
802
  .pathways-display-text {
@@ -685,7 +813,7 @@ export default {
685
813
  float: right;
686
814
  }
687
815
 
688
- .checkbox-container {
816
+ .checkbox-container {
689
817
  display: flex;
690
818
  cursor: pointer;
691
819
  }
@@ -699,48 +827,47 @@ export default {
699
827
 
700
828
  .my-checkbox {
701
829
  background-color: #fff;
702
- width:100%;
830
+ width: 100%;
703
831
  }
704
832
 
705
833
  .checkbox-group-inner {
706
- padding:18px;
834
+ padding: 18px;
707
835
  }
708
836
 
709
- .flatmap-marker-help{
837
+ .flatmap-marker-help {
710
838
  display: inline-block;
711
839
  }
712
840
 
713
- >>> .popper-bump-right{
841
+ ::v-deep .popper-bump-right {
714
842
  left: 30px;
715
843
  }
716
844
 
717
- >>> .el-checkbox__label {
718
- padding-left:5px;
719
- color: rgb(131, 0, 191);
845
+ ::v-deep .el-checkbox__label {
846
+ padding-left: 5px;
847
+ color: $app-primary-color;
720
848
  font-size: 12px;
721
849
  font-weight: 500;
722
850
  letter-spacing: 0px;
723
851
  line-height: 14px;
724
852
  }
725
853
 
726
- >>> .el-checkbox__input.is-indeterminate .el-checkbox__inner
727
- {
728
- background-color: #8300bf;
729
- border-color: #8300bf;
730
- }
731
-
732
- >>> .el-checkbox__input.is-checked .el-checkbox__inner {
733
- background-color: #8300bf;
734
- border-color: #8300bf;
854
+ ::v-deep .el-checkbox__input {
855
+ &.is-indeterminate,
856
+ &.is-checked {
857
+ .el-checkbox__inner {
858
+ background-color: $app-primary-color;
859
+ border-color: $app-primary-color;
860
+ }
861
+ }
735
862
  }
736
863
 
737
- >>> .el-checkbox__label {
738
- color: #8300bf !important;
864
+ ::v-deep .el-checkbox__label {
865
+ color: $app-primary-color !important;
739
866
  }
740
867
 
741
868
  .el-dropdown-link {
742
869
  cursor: pointer;
743
- color: #409EFF;
870
+ color: #409eff;
744
871
  }
745
872
  .el-icon-arrow-down {
746
873
  font-size: 12px;
@@ -756,119 +883,122 @@ export default {
756
883
  display: none;
757
884
  }
758
885
 
759
- >>> .mapboxgl-popup{
886
+ ::v-deep .mapboxgl-popup {
760
887
  max-width: 300px !important;
761
888
  }
762
889
 
763
- >>>.flatmap-tooltip-popup .mapboxgl-popup-content {
764
- border-radius: 4px;
765
- box-shadow: 0 1px 2px rgba(0,0,0,.1);
766
- pointer-events: none;
767
- display: none;
768
- background: #fff;
769
- border: 1px solid rgb(131, 0, 191);
770
- padding-left: 6px;
771
- padding-right: 6px;
772
- display: flex;
773
- justify-content: center;
774
- align-items: center;
775
-
776
- }
777
-
778
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-content {
779
- margin-bottom: 12px;
780
- }
781
-
782
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-content {
783
- margin-top: 18px;
784
- }
785
-
786
- >>> .mapboxgl-popup.flatmap-marker-popup{
787
- box-shadow: 1px 1px 2px rgba(0,0,0,.1);
788
- pointer-events: auto;
789
- background: #fff;
790
- }
791
-
792
-
793
- >>>.flatmap-tooltip-popup .mapboxgl-popup-content::after,
794
- >>>.flatmap-tooltip-popup .mapboxgl-popup-content::before {
795
- content: '';
796
- display: block;
797
- position: absolute;
798
- width: 0;
799
- height: 0;
800
- border-style: solid;
801
- flex-shrink: 0;
802
- }
803
-
804
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-content::after,
805
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-content::before {
806
- top: 100%;
807
- }
808
-
809
- /* this border color controlls the color of the triangle (what looks like the fill of the triangle) */
810
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-content::after {
811
- margin-top: -1px;
812
- border-color: rgb(255, 255, 255) transparent transparent transparent ;
813
- border-width: 12px;
814
- }
815
-
816
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-content::after,
817
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-content::before {
818
- top: calc(-100% + 6px);
890
+ ::v-deep .flatmap-tooltip-popup {
891
+ &.mapboxgl-popup-anchor-bottom {
892
+ .mapboxgl-popup-content {
893
+ margin-bottom: 12px;
894
+ &::after,
895
+ &::before {
896
+ top: 100%;
897
+ border-width: 12px;
898
+ }
899
+ /* this border color controlls the color of the triangle (what looks like the fill of the triangle) */
900
+ &::after {
901
+ margin-top: -1px;
902
+ border-color: rgb(255, 255, 255) transparent transparent transparent;
903
+ }
904
+ /* this border color controlls the outside, thin border */
905
+ &::before {
906
+ margin: 0 auto;
907
+ border-color: $app-primary-color transparent transparent transparent;
908
+ }
909
+ }
910
+ }
911
+ &.mapboxgl-popup-anchor-top {
912
+ .mapboxgl-popup-content {
913
+ margin-top: 18px;
914
+ &::after,
915
+ &::before {
916
+ top: calc(-100% + 6px);
917
+ border-width: 12px;
918
+ }
919
+ /* this border color controlls the color of the triangle (what looks like the fill of the triangle) */
920
+ &::after {
921
+ margin-top: 1px;
922
+ border-color: transparent transparent rgb(255, 255, 255) transparent;
923
+ }
924
+ &::before {
925
+ margin: 0 auto;
926
+ border-color: transparent transparent $app-primary-color transparent;
927
+ }
928
+ }
929
+ }
930
+ .mapboxgl-popup-content {
931
+ border-radius: 4px;
932
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
933
+ pointer-events: none;
934
+ display: none;
935
+ background: #fff;
936
+ border: 1px solid $app-primary-color;
937
+ padding-left: 6px;
938
+ padding-right: 6px;
939
+ display: flex;
940
+ justify-content: center;
941
+ align-items: center;
942
+ &::after,
943
+ &::before {
944
+ content: "";
945
+ display: block;
946
+ position: absolute;
947
+ width: 0;
948
+ height: 0;
949
+ border-style: solid;
950
+ flex-shrink: 0;
951
+ }
952
+ }
953
+ .mapboxgl-popup-tip {
954
+ display: none;
955
+ }
819
956
  }
820
957
 
821
- /* this border color controlls the color of the triangle (what looks like the fill of the triangle) */
822
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-content::after {
823
- margin-top: 1px;
824
- border-color: transparent transparent rgb(255, 255, 255) transparent ;
825
- border-width: 12px;
958
+ ::v-deep .mapboxgl-popup {
959
+ &.flatmap-marker-popup {
960
+ box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
961
+ pointer-events: auto;
962
+ background: #fff;
963
+ }
826
964
  }
827
965
 
828
966
  /* Fix for chrome bug where under triangle pops up above one on top of it */
829
- .selector:not(*:root), >>>.flatmap-tooltip-popup .mapboxgl-popup-content::after{
830
- top: 99.9%;
831
- }
832
-
833
- /* this border color controlls the outside, thin border */
834
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-content::before {
835
- margin: 0 auto;
836
- border-color: rgb(131, 0, 191) transparent transparent transparent ;
837
- border-width: 12px;
838
- }
839
-
840
- >>>.flatmap-tooltip-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-content::before {
841
- margin: 0 auto;
842
- border-color: transparent transparent rgb(131, 0, 191) transparent ;
843
- border-width: 12px;
844
- }
845
-
846
- >>> .flatmap-tooltip-popup .mapboxgl-popup-tip{
847
- display: none;
967
+ .selector:not(*:root),
968
+ ::v-deep.flatmap-tooltip-popup {
969
+ .mapboxgl-popup-content::after {
970
+ top: 99.9%;
971
+ }
848
972
  }
849
973
 
850
- >>> .flatmap-tooltip-dialog .mapboxgl-popup-tip {
851
- display: none;
974
+ ::v-deep .flatmap-tooltip-dialog {
975
+ .mapboxgl-popup-tip {
976
+ display: none;
977
+ }
852
978
  }
853
979
 
854
- >>> .flatmap-marker-popup .mapboxgl-popup-content {
855
- padding: 0px;
980
+ ::v-deep .flatmap-marker-popup {
981
+ .mapboxgl-popup-content {
982
+ padding: 0px;
983
+ }
856
984
  }
857
985
 
858
- >>>.flatmapvuer-popover .mapboxgl-popup-close-button {
859
- position: absolute;
860
- right: 0.5em;
861
- top: 0;
862
- border: 0;
863
- border-radius: 0 3px 0 0;
864
- cursor: pointer;
865
- background-color: transparent;
866
- font-size: 2.5em;
867
- color: grey;
868
- top: 0.95em;
986
+ ::v-deep .flatmapvuer-popover {
987
+ .mapboxgl-popup-close-button {
988
+ position: absolute;
989
+ right: 0.5em;
990
+ top: 0;
991
+ border: 0;
992
+ border-radius: 0 3px 0 0;
993
+ cursor: pointer;
994
+ background-color: transparent;
995
+ font-size: 2.5em;
996
+ color: grey;
997
+ top: 0.95em;
998
+ }
869
999
  }
870
1000
 
871
- .zoomOut{
1001
+ .zoomOut {
872
1002
  padding-left: 8px;
873
1003
  }
874
1004
 
@@ -888,25 +1018,24 @@ export default {
888
1018
  left: 24px;
889
1019
  }
890
1020
 
891
- >>> .background-popper {
1021
+ ::v-deep .background-popper {
892
1022
  padding: 5px 12px;
893
1023
  background-color: #ffffff;
894
- border: 1px solid rgb(131, 0, 191);
1024
+ border: 1px solid $app-primary-color;
895
1025
  box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
896
1026
  height: 200px;
897
1027
  width: 175px;
898
- min-width:175px;
899
- }
900
-
901
- >>> .background-popper.el-popper[x-placement^="top"] .popper__arrow {
902
- border-top-color: #8300bf !important;
903
- }
904
-
905
- >>> .background-popper.el-popper[x-placement^="top"] .popper__arrow:after {
906
- border-top-color: #fff !important;
1028
+ min-width: 175px;
1029
+ &.el-popper[x-placement^="top"] {
1030
+ .popper__arrow {
1031
+ border-top-color: $app-primary-color !important;
1032
+ &::after {
1033
+ border-top-color: #fff !important;
1034
+ }
1035
+ }
1036
+ }
907
1037
  }
908
1038
 
909
-
910
1039
  .backgroundText {
911
1040
  color: rgb(48, 49, 51);
912
1041
  font-size: 14px;
@@ -916,185 +1045,193 @@ export default {
916
1045
 
917
1046
  .backgroundControl {
918
1047
  display: flex;
919
- margin-top:16px;
1048
+ margin-top: 16px;
920
1049
  }
921
1050
 
922
1051
  .backgroundChoice {
923
- width:20px;
924
- height:20px;
1052
+ width: 20px;
1053
+ height: 20px;
925
1054
  border: 1px solid rgb(144, 147, 153);
926
- margin-left:20px;
927
- }
928
- .backgroundChoice.active {
929
- border:2px solid #8300bf;
930
- }
931
- .backgroundChoice:hover {
932
- cursor: pointer;
933
- }
934
-
935
- .backgroundChoice.white {
936
- background-color: white;
937
- margin-left:10px;
938
- }
939
- .backgroundChoice.black {
940
- background-color: black;
941
- }
942
- .backgroundChoice.lightskyblue {
943
- background-color: lightskyblue;
1055
+ margin-left: 20px;
1056
+ &.active {
1057
+ border: 2px solid $app-primary-color;
1058
+ }
1059
+ &:hover {
1060
+ cursor: pointer;
1061
+ }
1062
+ &.white {
1063
+ background-color: white;
1064
+ margin-left: 10px;
1065
+ }
1066
+ &.black {
1067
+ background-color: black;
1068
+ }
1069
+ &.lightskyblue {
1070
+ background-color: white;
1071
+ }
944
1072
  }
945
1073
 
946
1074
  .togglePaths {
947
- top:201px;
948
- right:20px;
1075
+ top: 201px;
1076
+ right: 20px;
949
1077
  position: absolute;
950
1078
  }
951
1079
 
952
1080
  .icon-button {
953
- height:24px!important;
954
- width:24px!important;
955
- color: #8300bf;
956
- }
957
- .icon-button:hover {
958
- cursor:pointer;
1081
+ height: 24px !important;
1082
+ width: 24px !important;
1083
+ color: $app-primary-color;
1084
+ &:hover {
1085
+ cursor: pointer;
1086
+ }
959
1087
  }
960
1088
 
961
- >>> .flatmap-popper {
1089
+ ::v-deep .flatmap-popper {
962
1090
  padding: 6px 4px;
963
- font-size:12px;
1091
+ font-size: 12px;
964
1092
  color: rgb(48, 49, 51);
965
1093
  background-color: #f3ecf6;
966
- border: 1px solid rgb(131, 0, 191);
1094
+ border: 1px solid $app-primary-color;
967
1095
  white-space: nowrap;
968
1096
  min-width: unset;
1097
+ &.warning-popper {
1098
+ min-width: 150px;
1099
+ max-width: 400px;
1100
+ word-break: keep-all;
1101
+ white-space: unset;
1102
+ }
1103
+ &.left-popper {
1104
+ .popper__arrow {
1105
+ border-left-color: $app-primary-color !important;
1106
+ &::after {
1107
+ border-left-color: #f3ecf6 !important;
1108
+ }
1109
+ }
1110
+ }
1111
+ &.right-popper {
1112
+ .popper__arrow {
1113
+ border-right-color: $app-primary-color !important;
1114
+ &:after {
1115
+ border-right-color: #f3ecf6 !important;
1116
+ }
1117
+ }
1118
+ }
1119
+ &.el-popper[x-placement^="top"] {
1120
+ .popper__arrow {
1121
+ border-top-color: $app-primary-color !important;
1122
+ &:after {
1123
+ border-top-color: #f3ecf6 !important;
1124
+ }
1125
+ }
1126
+ }
969
1127
  }
970
1128
 
971
- >>> .flatmap-marker{
972
- cursor: pointer;
973
- }
974
-
975
- >>>.el-loading-spinner i{
976
- color: #8300bf;
977
- }
978
- >>>.el-loading-spinner .el-loading-text {
979
- color: #8300bf;
980
- }
981
-
982
- >>> .flatmap-popup-popper .mapboxgl-popup-content {
983
- padding: 6px 4px;
984
- font-size:12px;
985
- color: rgb(48, 49, 51);
986
- background-color: #f3ecf6;
987
- border: 1px solid rgb(131, 0, 191);
988
- word-break: keep-all;
989
- min-width: unset;
990
- }
991
-
992
- >>>.flatmap-popper.left-popper .popper__arrow{
993
- border-left-color: #8300bf !important;
994
- }
995
-
996
- >>>.flatmap-popper.left-popper .popper__arrow:after{
997
- border-left-color: #f3ecf6 !important;
998
- }
999
-
1000
- >>>.flatmap-popper.right-popper .popper__arrow{
1001
- border-right-color: #8300bf !important;
1002
- }
1003
-
1004
- >>>.flatmap-popper.right-popper .popper__arrow:after{
1005
- border-right-color: #f3ecf6 !important;
1006
- }
1007
-
1008
- >>>.flatmap-popper.el-popper[x-placement^="top"] .popper__arrow {
1009
- border-top-color:#8300bf !important;
1129
+ ::v-deep .el-loading-spinner {
1130
+ i,
1131
+ .el-loading-text {
1132
+ color: $app-primary-color;
1133
+ }
1010
1134
  }
1011
1135
 
1012
- >>>.flatmap-popper.el-popper[x-placement^="top"] .popper__arrow:after{
1013
- border-top-color: #f3ecf6 !important;
1136
+ ::v-deep .flatmap-popup-popper {
1137
+ .mapboxgl-popup-tip {
1138
+ border-bottom-color: $app-primary-color;
1139
+ }
1140
+ .mapboxgl-popup-content {
1141
+ padding: 6px 4px;
1142
+ font-size: 12px;
1143
+ color: rgb(48, 49, 51);
1144
+ background-color: #f3ecf6;
1145
+ border: 1px solid $app-primary-color;
1146
+ white-space: nowrap;
1147
+ min-width: unset;
1148
+ .mapboxgl-popup-close-button {
1149
+ display: none;
1150
+ }
1151
+ }
1014
1152
  }
1015
1153
 
1016
- >>>.popper-zoomout {
1017
- padding-right:13px!important;
1018
- left:-21px!important;
1154
+ ::v-deep .flatmap-popper {
1155
+
1019
1156
  }
1020
1157
 
1021
- >>>.popper-zoomout .popper__arrow{
1022
- left:53px!important;
1158
+ ::v-deep .popper-zoomout {
1159
+ padding-right: 13px !important;
1160
+ left: -21px !important;
1023
1161
  }
1024
1162
 
1025
- >>> .flatmap-popup-popper .mapboxgl-popup-content .mapboxgl-popup-close-button {
1026
- display: none;
1163
+ ::v-deep .popper-zoomout {
1164
+ .popper__arrow {
1165
+ left: 53px !important;
1166
+ }
1027
1167
  }
1028
1168
 
1029
- >>> .mapboxgl-popup-content {
1169
+ ::v-deep .mapboxgl-popup-content {
1030
1170
  padding: 0px;
1031
1171
  }
1032
1172
 
1033
- >>> .flatmap-popup-popper .mapboxgl-popup-tip {
1034
- border-bottom-color: #8300bf;
1035
- }
1036
-
1037
1173
  .bottom-right-control {
1038
- position:absolute;
1039
- right:16px;
1040
- bottom:16px;
1174
+ position: absolute;
1175
+ right: 16px;
1176
+ bottom: 16px;
1041
1177
  }
1042
1178
 
1043
- >>> .my-drawer {
1044
- background: rgba(0,0,0,0);
1179
+ ::v-deep .my-drawer {
1180
+ background: rgba(0, 0, 0, 0);
1045
1181
  box-shadow: none;
1046
1182
  }
1047
1183
 
1048
- .drawer >>> .el-drawer:focus{
1049
- outline:none;
1050
- }
1051
-
1052
- .open-drawer{
1053
- width: 20px;
1054
- height: 40px;
1055
- z-index: 8;
1056
- position: absolute;
1057
- left: 0px;
1058
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
1059
- border: solid 1px #e4e7ed;
1060
- background-color: #F7FAFF;
1061
- text-align: center;
1062
- vertical-align: middle;
1063
- cursor: pointer;
1064
- pointer-events: auto;
1184
+ .drawer {
1185
+ ::v-deep .el-drawer:focus {
1186
+ outline: none;
1187
+ }
1065
1188
  }
1066
1189
 
1190
+ .open-drawer,
1067
1191
  .drawer-button {
1068
- float: left;
1192
+ z-index: 8;
1069
1193
  width: 20px;
1070
1194
  height: 40px;
1071
- z-index: 8;
1072
- margin-top:calc(50% - 36px);
1073
1195
  border: solid 1px #e4e7ed;
1074
- border-left: 0;
1075
- background-color: #FFFFFF;
1076
1196
  text-align: center;
1077
1197
  vertical-align: middle;
1078
1198
  cursor: pointer;
1079
1199
  pointer-events: auto;
1080
1200
  }
1081
1201
 
1082
- .drawer-button i{
1083
- margin-top:12px;
1084
- color: #8300bf;
1085
- transition-delay: 0.9s;
1086
- }
1087
-
1088
- .drawer-button.open i{
1089
- transform: rotate(0deg) scaleY(2.5);
1202
+ .open-drawer {
1203
+ position: absolute;
1204
+ left: 0px;
1205
+ background-color: #f7faff;
1206
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
1090
1207
  }
1091
1208
 
1092
- .drawer-button.close i{
1093
- transform: rotate(180deg) scaleY(2.5);
1209
+ .drawer-button {
1210
+ float: left;
1211
+ margin-top: calc(50% - 36px);
1212
+ border-left: 0;
1213
+ background-color: #ffffff;
1214
+ i {
1215
+ margin-top: 12px;
1216
+ color: $app-primary-color;
1217
+ transition-delay: 0.9s;
1218
+ }
1219
+ &.open {
1220
+ i {
1221
+ transform: rotate(0deg) scaleY(2.5);
1222
+ }
1223
+ }
1224
+ &.close {
1225
+ i {
1226
+ transform: rotate(180deg) scaleY(2.5);
1227
+ }
1228
+ }
1094
1229
  }
1095
1230
 
1096
- >>>.mapboxgl-canvas-container canvas {
1097
- outline:none;
1231
+ ::v-deep .mapboxgl-canvas-container {
1232
+ canvas {
1233
+ outline: none;
1234
+ }
1098
1235
  }
1099
1236
 
1100
1237
  .backgroundSpacer {
@@ -1102,32 +1239,24 @@ export default {
1102
1239
  margin-bottom: 10px;
1103
1240
  }
1104
1241
 
1105
- .flatmap-radio >>> label{
1106
- margin-right:20px;
1107
- }
1108
-
1109
- .flatmap-radio >>> label:last-child{
1110
- margin-right:0px;
1111
- }
1112
-
1113
- .flatmap-radio >>> .el-radio__input.is-checked+.el-radio__label {
1114
- color: #8300bf;
1115
- }
1116
-
1117
- .flatmap-radio >>> .el-radio__input.is-checked .el-radio__inner {
1118
- border-color: #8300bf;
1119
- background: #8300bf;
1242
+ .flatmap-radio {
1243
+ ::v-deep label {
1244
+ margin-right: 20px;
1245
+ &:last-child {
1246
+ margin-right: 0px;
1247
+ }
1248
+ }
1249
+ .el-radio__input {
1250
+ &.is-checked {
1251
+ & + .el-radio__label {
1252
+ color: $app-primary-color;
1253
+ }
1254
+ .el-radio__inner {
1255
+ border-color: $app-primary-color;
1256
+ background: $app-primary-color;
1257
+ }
1258
+ }
1259
+ }
1120
1260
  }
1121
-
1122
1261
  </style>
1123
1262
 
1124
- <style scoped src="../styles/purple/checkbox.css">
1125
- </style>
1126
- <style scoped src="../styles/purple/checkbox-group.css">
1127
- </style>
1128
- <style scoped src="../styles/purple/row.css">
1129
- </style>
1130
- <style scoped src="../styles/purple/button.css">
1131
- </style>
1132
- <style scoped src="../styles/purple/loading.css">
1133
- </style>