@abi-software/flatmapvuer 0.3.13-beta-3 → 0.3.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/dist/flatmapvuer.common.js +105 -61
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +105 -61
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +1 -1
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package-lock.json +10 -10
- package/package.json +2 -2
- package/src/components/FlatmapVuer.vue +85 -10
- package/src/components/MultiFlatmapVuer.vue +4 -4
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -1331,9 +1331,9 @@
|
|
|
1331
1331
|
"integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ=="
|
|
1332
1332
|
},
|
|
1333
1333
|
"@mapbox/tiny-sdf": {
|
|
1334
|
-
"version": "2.0.
|
|
1335
|
-
"resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.
|
|
1336
|
-
"integrity": "sha512-
|
|
1334
|
+
"version": "2.0.6",
|
|
1335
|
+
"resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz",
|
|
1336
|
+
"integrity": "sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA=="
|
|
1337
1337
|
},
|
|
1338
1338
|
"@mapbox/unitbezier": {
|
|
1339
1339
|
"version": "0.0.1",
|
|
@@ -2972,9 +2972,9 @@
|
|
|
2972
2972
|
}
|
|
2973
2973
|
},
|
|
2974
2974
|
"bezier-js": {
|
|
2975
|
-
"version": "6.1.
|
|
2976
|
-
"resolved": "https://registry.npmjs.org/bezier-js/-/bezier-js-6.1.
|
|
2977
|
-
"integrity": "sha512-
|
|
2975
|
+
"version": "6.1.3",
|
|
2976
|
+
"resolved": "https://registry.npmjs.org/bezier-js/-/bezier-js-6.1.3.tgz",
|
|
2977
|
+
"integrity": "sha512-VPFvkyO98oCJ1Tsi+bFBrKEWLdefAj4DJVaWp3xTEsdCbunC7Pt/nTeIgu/UdskBNcmHv8TOfsgdMZb1GsICmg=="
|
|
2978
2978
|
},
|
|
2979
2979
|
"bfj": {
|
|
2980
2980
|
"version": "6.1.2",
|
|
@@ -13250,9 +13250,9 @@
|
|
|
13250
13250
|
"optional": true
|
|
13251
13251
|
},
|
|
13252
13252
|
"json5": {
|
|
13253
|
-
"version": "2.2.
|
|
13254
|
-
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.
|
|
13255
|
-
"integrity": "sha512-
|
|
13253
|
+
"version": "2.2.3",
|
|
13254
|
+
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
|
13255
|
+
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
|
13256
13256
|
"dev": true,
|
|
13257
13257
|
"optional": true
|
|
13258
13258
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"main": "./dist/flatmapvuer.common.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"lint": "vue-cli-service lint"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@abi-software/flatmap-viewer": "
|
|
24
|
+
"@abi-software/flatmap-viewer": "2.2.9",
|
|
25
25
|
"@abi-software/svg-sprite": "^0.1.14",
|
|
26
26
|
"core-js": "^3.3.2",
|
|
27
27
|
"css-element-queries": "^1.2.2",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="flatmap-container"
|
|
4
|
+
ref="flatmapContainer"
|
|
4
5
|
v-loading="loading"
|
|
5
6
|
element-loading-text="Loading..."
|
|
6
7
|
element-loading-spinner="el-icon-loading"
|
|
@@ -56,6 +57,9 @@
|
|
|
56
57
|
<span class="warning-text">What's new?</span>
|
|
57
58
|
</i>
|
|
58
59
|
</div>
|
|
60
|
+
|
|
61
|
+
<!-- The element below is placed onto the flatmap when it is ready -->
|
|
62
|
+
<i class="el-icon-arrow-down minimap-resize" :class="{ enlarge: minimapSmall, shrink: !minimapSmall}" ref="minimapResize" v-show="minimapResizeShow" @click="closeMinimap"></i>
|
|
59
63
|
|
|
60
64
|
<div class="bottom-right-control">
|
|
61
65
|
<el-popover
|
|
@@ -528,6 +532,23 @@ export default {
|
|
|
528
532
|
this.mapImp.showMarkerPopup(featureId, node, options);
|
|
529
533
|
}
|
|
530
534
|
},
|
|
535
|
+
closeMinimap: function(){
|
|
536
|
+
let minimapEl = this.$refs.flatmapContainer.querySelector('.maplibregl-ctrl-minimap'); // find minimap
|
|
537
|
+
if (this.minimapSmall) { //switch the classes on the minimap
|
|
538
|
+
minimapEl.classList.add('enlarge');
|
|
539
|
+
minimapEl.classList.remove('shrink');
|
|
540
|
+
} else {
|
|
541
|
+
minimapEl.classList.add('shrink');
|
|
542
|
+
minimapEl.classList.remove('enlarge');
|
|
543
|
+
}
|
|
544
|
+
this.minimapSmall = !this.minimapSmall;
|
|
545
|
+
},
|
|
546
|
+
addResizeButtonToMinimap: function(){
|
|
547
|
+
let minimapEl = this.$refs.flatmapContainer.querySelector('.maplibregl-ctrl-minimap');
|
|
548
|
+
this.$refs.minimapResize.parentNode.removeChild(this.$refs.minimapResize);
|
|
549
|
+
minimapEl.appendChild(this.$refs.minimapResize);
|
|
550
|
+
this.minimapResizeShow = true;
|
|
551
|
+
},
|
|
531
552
|
setHelpMode: function(helpMode) {
|
|
532
553
|
if (helpMode) {
|
|
533
554
|
this.inHelp = true;
|
|
@@ -686,15 +707,7 @@ export default {
|
|
|
686
707
|
);
|
|
687
708
|
promise1.then(returnedObject => {
|
|
688
709
|
this.mapImp = returnedObject;
|
|
689
|
-
this.
|
|
690
|
-
this.$refs.display,
|
|
691
|
-
mapResize(this.mapImp)
|
|
692
|
-
);
|
|
693
|
-
this.mapImp.setBackgroundOpacity(1);
|
|
694
|
-
this.backgroundChangeCallback(this.currentBackground);
|
|
695
|
-
this.pathways = this.mapImp.pathTypes();
|
|
696
|
-
this.$emit("ready", this);
|
|
697
|
-
this.loading = false;
|
|
710
|
+
this.onFlatmapReady();
|
|
698
711
|
if (this._stateToBeSet)
|
|
699
712
|
this.restoreMapState(this._stateToBeSet);
|
|
700
713
|
else {
|
|
@@ -707,6 +720,20 @@ export default {
|
|
|
707
720
|
this.restoreMapState(this._stateToBeSet);
|
|
708
721
|
}
|
|
709
722
|
},
|
|
723
|
+
onFlatmapReady: function(){
|
|
724
|
+
// onFlatmapReady is used for functions that need to run immediately after the flatmap is loaded
|
|
725
|
+
|
|
726
|
+
this.sensor = new ResizeSensor(
|
|
727
|
+
this.$refs.display,
|
|
728
|
+
mapResize(this.mapImp)
|
|
729
|
+
);
|
|
730
|
+
this.mapImp.setBackgroundOpacity(1);
|
|
731
|
+
this.backgroundChangeCallback(this.currentBackground);
|
|
732
|
+
this.pathways = this.mapImp.pathTypes();
|
|
733
|
+
this.$emit("ready", this);
|
|
734
|
+
this.addResizeButtonToMinimap();
|
|
735
|
+
this.loading = false;
|
|
736
|
+
},
|
|
710
737
|
showMinimap: function(flag) {
|
|
711
738
|
if (this.mapImp)
|
|
712
739
|
this.mapImp.showMinimap(flag);
|
|
@@ -861,7 +888,9 @@ export default {
|
|
|
861
888
|
drawerOpen: true,
|
|
862
889
|
tooltipContent: { featureIds: []},
|
|
863
890
|
colourRadio: true,
|
|
864
|
-
outlinesRadio: true
|
|
891
|
+
outlinesRadio: true,
|
|
892
|
+
minimapResizeShow: false,
|
|
893
|
+
minimapSmall: false
|
|
865
894
|
};
|
|
866
895
|
},
|
|
867
896
|
watch: {
|
|
@@ -1310,6 +1339,52 @@ export default {
|
|
|
1310
1339
|
}
|
|
1311
1340
|
}
|
|
1312
1341
|
|
|
1342
|
+
::v-deep .maplibregl-ctrl-minimap {
|
|
1343
|
+
transform-origin: top right;
|
|
1344
|
+
@media (max-width: 1250px) {
|
|
1345
|
+
height: 125px !important;// important is needed here as we are over-riding the style set by the flatmap
|
|
1346
|
+
width: 180px !important;
|
|
1347
|
+
>>> .maplibregl-canvas .mapboxgl-canvas {
|
|
1348
|
+
height: 125px !important;
|
|
1349
|
+
width: 180px !important;
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
@media (min-width: 1251px) {
|
|
1353
|
+
height: 190px !important;
|
|
1354
|
+
width: 300px !important;
|
|
1355
|
+
>>> .maplibregl-canvas .mapboxgl-canvas {
|
|
1356
|
+
height: 190px !important;
|
|
1357
|
+
width: 300px !important;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
transition: all 1s ease;
|
|
1361
|
+
&.shrink {
|
|
1362
|
+
transform: scale(0.5);
|
|
1363
|
+
transform: scale(0.5);
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
.minimap-resize {
|
|
1368
|
+
position: absolute;
|
|
1369
|
+
pointer-events: all;
|
|
1370
|
+
cursor: pointer;
|
|
1371
|
+
top: 0;
|
|
1372
|
+
right: 0;
|
|
1373
|
+
padding-top: 3px; // needed as icon is offset
|
|
1374
|
+
width: 20px;
|
|
1375
|
+
height: 14px;
|
|
1376
|
+
z-index: 9;
|
|
1377
|
+
transition: all 1s ease;
|
|
1378
|
+
&.shrink {
|
|
1379
|
+
transform: rotate(0deg);
|
|
1380
|
+
}
|
|
1381
|
+
&.enlarge {
|
|
1382
|
+
transform: rotate(180deg) scale(2);
|
|
1383
|
+
padding-bottom: 5px; // note padding is added to the opposite side since it is rotated
|
|
1384
|
+
padding-left: 5px;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1313
1388
|
::v-deep .flatmap-popper {
|
|
1314
1389
|
padding: 6px 4px;
|
|
1315
1390
|
font-size: 12px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="multi-container">
|
|
2
|
+
<div class="multi-container" ref="multiContainer">
|
|
3
3
|
<div style="position:absolute;z-index:10;">
|
|
4
4
|
<div class="species-display-text">
|
|
5
5
|
Species
|
|
@@ -414,7 +414,7 @@ export default {
|
|
|
414
414
|
activeSpecies: undefined,
|
|
415
415
|
appendToBody: false,
|
|
416
416
|
speciesList: {},
|
|
417
|
-
requireInitialisation: true
|
|
417
|
+
requireInitialisation: true
|
|
418
418
|
};
|
|
419
419
|
},
|
|
420
420
|
watch: {
|
|
@@ -467,7 +467,8 @@ export default {
|
|
|
467
467
|
border: 1px solid $app-primary-color;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
}
|
|
470
|
+
}
|
|
471
|
+
|
|
471
472
|
|
|
472
473
|
::v-deep .flatmap_dropdown {
|
|
473
474
|
min-width: 160px!important;
|
|
@@ -506,4 +507,3 @@ export default {
|
|
|
506
507
|
|
|
507
508
|
</style>
|
|
508
509
|
|
|
509
|
-
|