@3dwayfinder/wayfinder-vue-components 1.24.13 → 1.24.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.
|
@@ -1431,6 +1431,10 @@ var script$D = {
|
|
|
1431
1431
|
type: Boolean,
|
|
1432
1432
|
default: true
|
|
1433
1433
|
},
|
|
1434
|
+
positionFloorChangePopup: {
|
|
1435
|
+
type: Boolean,
|
|
1436
|
+
default: false
|
|
1437
|
+
},
|
|
1434
1438
|
POIPopupEnabled: {
|
|
1435
1439
|
type: Boolean,
|
|
1436
1440
|
default: false
|
|
@@ -1469,7 +1473,16 @@ var script$D = {
|
|
|
1469
1473
|
}
|
|
1470
1474
|
},
|
|
1471
1475
|
computed: {
|
|
1472
|
-
...mapState('wf', ['language'])
|
|
1476
|
+
...mapState('wf', ['language']),
|
|
1477
|
+
pathTextPositionStyle() {
|
|
1478
|
+
if (!this.positionFloorChangePopup || !this.pathTextPosition) {
|
|
1479
|
+
return null;
|
|
1480
|
+
}
|
|
1481
|
+
return {
|
|
1482
|
+
left: this.pathTextPosition[0] + "px",
|
|
1483
|
+
top: this.pathTextPosition[1] + "px"
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1473
1486
|
},
|
|
1474
1487
|
mounted() {
|
|
1475
1488
|
this.load();
|
|
@@ -1569,11 +1582,17 @@ var script$D = {
|
|
|
1569
1582
|
wayfinder.events.on('language-change', () => {
|
|
1570
1583
|
this.update(wayfinder);
|
|
1571
1584
|
});
|
|
1572
|
-
wayfinder.events.on("floor-change-before", (currentFloor, nextFloor, destinationFloor) => {
|
|
1585
|
+
wayfinder.events.on("floor-change-before", (currentFloor, nextFloor, destinationFloor, spot) => {
|
|
1573
1586
|
this.pathText = wayfinder.translator.get("go_to_floor", [currentFloor.getName(wayfinder.getLanguage()), destinationFloor.getName(wayfinder.getLanguage()), nextFloor.getName(wayfinder.getLanguage())]);
|
|
1587
|
+
this.floorChangePosition = spot && spot.position ? spot.position : null;
|
|
1588
|
+
console.log('spot', spot);
|
|
1589
|
+
this.updatePathTextPosition();
|
|
1574
1590
|
this.pathTextVisible = true;
|
|
1575
1591
|
});
|
|
1576
1592
|
wayfinder.events.on("map-update", () => {
|
|
1593
|
+
if (this.pathTextVisible) {
|
|
1594
|
+
this.updatePathTextPosition();
|
|
1595
|
+
}
|
|
1577
1596
|
if (this.POIPopupEnabled && this.poiPopupVisible && this.popupPOI) {
|
|
1578
1597
|
this.showPOIPopup(this.popupPOI);
|
|
1579
1598
|
}
|
|
@@ -1639,7 +1658,9 @@ var script$D = {
|
|
|
1639
1658
|
this.updateStoreGetter("wf/xFloors", this.$store.state);
|
|
1640
1659
|
if (Vue$1.prototype.$wayfinder && typeof Vue$1.prototype.$wayfinder.getCurrentBuilding === "function") {
|
|
1641
1660
|
const building = Vue$1.prototype.$wayfinder.getCurrentBuilding();
|
|
1661
|
+
const floor = Vue$1.prototype.$wayfinder.getCurrentFloor();
|
|
1642
1662
|
this.$store.dispatch('wf/SET_CURRENT_BUILDING', building && typeof building.copy === "function" ? building.copy() : building);
|
|
1663
|
+
this.$store.dispatch('wf/SET_CURRENT_FLOOR', floor && typeof building.copy === "function" ? floor.copy() : floor);
|
|
1643
1664
|
}
|
|
1644
1665
|
},
|
|
1645
1666
|
updateStoreGetter(key, state) {
|
|
@@ -1677,6 +1698,16 @@ var script$D = {
|
|
|
1677
1698
|
this.poiPopupVisible = false;
|
|
1678
1699
|
this.$emit('showInfo', poi);
|
|
1679
1700
|
},
|
|
1701
|
+
updatePathTextPosition() {
|
|
1702
|
+
this.pathTextPosition = null;
|
|
1703
|
+
if (!this.positionFloorChangePopup || typeof wayfinder.getNodeScreenPosition !== "function") {
|
|
1704
|
+
return;
|
|
1705
|
+
}
|
|
1706
|
+
let position = wayfinder.getNodeScreenPosition(this.floorChangePosition);
|
|
1707
|
+
if (position) {
|
|
1708
|
+
this.pathTextPosition = position;
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1680
1711
|
showPOIPopup(poi, _width, _height) {
|
|
1681
1712
|
this.popupPOI = Object.freeze(poi);
|
|
1682
1713
|
if (this.POIPopupEnabled && this.popupPOI && this.$refs.poiPopup && poi.getNode()) {
|
|
@@ -1732,6 +1763,8 @@ var script$D = {
|
|
|
1732
1763
|
loaded: false,
|
|
1733
1764
|
pathTextVisible: false,
|
|
1734
1765
|
pathText: '',
|
|
1766
|
+
pathTextPosition: null,
|
|
1767
|
+
floorChangePosition: null,
|
|
1735
1768
|
poiPopupVisible: false,
|
|
1736
1769
|
popupPOI: null
|
|
1737
1770
|
};
|
|
@@ -1772,7 +1805,11 @@ var __vue_render__$D = function () {
|
|
|
1772
1805
|
value: _vm.showPathText && _vm.pathTextVisible,
|
|
1773
1806
|
expression: "showPathText && pathTextVisible"
|
|
1774
1807
|
}],
|
|
1775
|
-
staticClass: "wf-map-path-text"
|
|
1808
|
+
staticClass: "wf-map-path-text",
|
|
1809
|
+
class: {
|
|
1810
|
+
'wf-map-path-text-positioned': _vm.positionFloorChangePopup && _vm.pathTextPosition
|
|
1811
|
+
},
|
|
1812
|
+
style: _vm.pathTextPositionStyle
|
|
1776
1813
|
}, [_vm._v("\n " + _vm._s(_vm.pathText) + "\n ")]), _vm._v(" "), _c('div', {
|
|
1777
1814
|
directives: [{
|
|
1778
1815
|
name: "show",
|
|
@@ -1810,14 +1847,14 @@ var __vue_staticRenderFns__$D = [];
|
|
|
1810
1847
|
/* style */
|
|
1811
1848
|
const __vue_inject_styles__$D = function (inject) {
|
|
1812
1849
|
if (!inject) return;
|
|
1813
|
-
inject("data-v-
|
|
1814
|
-
source: ".wf-map-container[data-v-
|
|
1850
|
+
inject("data-v-378fdbc7_0", {
|
|
1851
|
+
source: ".wf-map-container[data-v-378fdbc7]{position:relative;width:100%;height:100%}.wf-map-container canvas[data-v-378fdbc7]{width:100%;height:100%;position:relative}.wf-map-container .wf-map-path-text[data-v-378fdbc7]{width:30ch;text-align:center;background-color:#fff;position:absolute;bottom:25%;margin:auto;left:50%;margin-left:-15ch;padding:.5em}.wf-map-container .wf-map-path-text.wf-map-path-text-positioned[data-v-378fdbc7]{bottom:auto;margin-left:0;transform:translate(-50%,calc(-100% - .5em))}#wf-poi-popup[data-v-378fdbc7]{position:absolute;top:0;left:0;z-index:10;width:15.5rem;height:auto;background-color:#fff;text-align:center;transform-origin:bottom;animation-duration:.5s;animation-iteration-count:2;cursor:pointer}.wf-poi-popup-content[data-v-378fdbc7]{display:flex;flex-direction:column;justify-content:stretch;height:100%}.wf-poi-popup-content>label[data-v-378fdbc7]{flex-grow:1;font-size:1.6rem;margin-top:.6rem;text-align:center;line-height:1.2;font-weight:600;margin-bottom:1.6rem}.wf-pin-down[data-v-378fdbc7]{background-color:#fff;width:1rem;height:1rem;position:absolute;bottom:-.5rem;border-radius:1rem 0 0 0;transform:rotate(45deg);left:50%;margin-left:-.75rem}.wf-pin-left .wf-pin-down[data-v-378fdbc7]{left:1rem}.wf-pin-right .wf-pin-down[data-v-378fdbc7]{right:1rem;left:auto}.wf-pin-up .wf-poi-popup-content[data-v-378fdbc7]{margin-bottom:0}.wf-pin-up .wf-pin-down[data-v-378fdbc7]{top:-.5rem;bottom:auto;transform:rotate(-45deg)}",
|
|
1815
1852
|
map: undefined,
|
|
1816
1853
|
media: undefined
|
|
1817
1854
|
});
|
|
1818
1855
|
};
|
|
1819
1856
|
/* scoped */
|
|
1820
|
-
const __vue_scope_id__$D = "data-v-
|
|
1857
|
+
const __vue_scope_id__$D = "data-v-378fdbc7";
|
|
1821
1858
|
/* module identifier */
|
|
1822
1859
|
const __vue_module_identifier__$D = undefined;
|
|
1823
1860
|
/* functional template */
|