proximiio-js-library 1.8.2 → 1.8.5
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.
|
@@ -357,6 +357,9 @@ var Map = /** @class */ (function () {
|
|
|
357
357
|
this.map.on('click', 'proximiio-pois-icons', function (ev) {
|
|
358
358
|
_this.onShopClick(ev);
|
|
359
359
|
});
|
|
360
|
+
this.map.on('click', 'pois-icons', function (ev) {
|
|
361
|
+
_this.onShopClick(ev);
|
|
362
|
+
});
|
|
360
363
|
this.onMapReadyListener.next(true);
|
|
361
364
|
if (this.defaultOptions.handleUrlParams) {
|
|
362
365
|
this.initUrlParams();
|
|
@@ -1531,9 +1534,13 @@ var Map = /** @class */ (function () {
|
|
|
1531
1534
|
var _this = this;
|
|
1532
1535
|
if (this.routingSource.lines && this.routingSource.route) {
|
|
1533
1536
|
var currentRouteIndex = this.routingSource.lines.findIndex(function (route) { return +route.properties.level === _this.state.floor.level; });
|
|
1534
|
-
var
|
|
1535
|
-
var nextRouteIndex =
|
|
1537
|
+
var currentRoute_1 = this.routingSource.lines[currentRouteIndex];
|
|
1538
|
+
var nextRouteIndex = this.routingSource.lines.findIndex(function (route) {
|
|
1539
|
+
return +route.properties.level ===
|
|
1540
|
+
(way === 'up' ? currentRoute_1.properties.level + 1 : currentRoute_1.properties.level - 1);
|
|
1541
|
+
});
|
|
1536
1542
|
var nextRoute = this.routingSource.lines[nextRouteIndex];
|
|
1543
|
+
console.log(currentRouteIndex, nextRouteIndex, this.routingSource);
|
|
1537
1544
|
// return currentRouteIndex !== -1 && nextRoute ? +nextRoute.properties.level : way === 'up' ? this.state.floor.level + 1 : this.state.floor.level - 1;
|
|
1538
1545
|
return nextRoute &&
|
|
1539
1546
|
((way === 'up' && +nextRoute.properties.level > this.state.floor.level) ||
|
|
@@ -43,12 +43,13 @@ var Routing = /** @class */ (function () {
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
Routing.prototype.route = function (start, finish) {
|
|
46
|
-
var points = this.wayfinding.runAStar(start, finish)
|
|
47
|
-
return new feature_1.default(i);
|
|
48
|
-
});
|
|
46
|
+
var points = this.wayfinding.runAStar(start, finish);
|
|
49
47
|
if (!points) {
|
|
50
48
|
return null;
|
|
51
49
|
}
|
|
50
|
+
points = points.map(function (i) {
|
|
51
|
+
return new feature_1.default(i);
|
|
52
|
+
});
|
|
52
53
|
var pathPoints = {};
|
|
53
54
|
var pathPartIndex = 0;
|
|
54
55
|
points.forEach(function (p, index) {
|
|
@@ -79,13 +79,13 @@ var RoutingSource = /** @class */ (function (_super) {
|
|
|
79
79
|
if (start && finish) {
|
|
80
80
|
this.notify('loading-start');
|
|
81
81
|
route = this.routing.route(start, finish);
|
|
82
|
-
paths = route.paths;
|
|
82
|
+
paths = route === null || route === void 0 ? void 0 : route.paths;
|
|
83
83
|
// @ts-ignore
|
|
84
|
-
this.route = route.paths;
|
|
84
|
+
this.route = route === null || route === void 0 ? void 0 : route.paths;
|
|
85
85
|
// @ts-ignore
|
|
86
|
-
this.points = route.points;
|
|
87
|
-
this.levelPaths = route.levelPaths;
|
|
88
|
-
this.levelPoints = route.levelPoints;
|
|
86
|
+
this.points = route === null || route === void 0 ? void 0 : route.points;
|
|
87
|
+
this.levelPaths = route === null || route === void 0 ? void 0 : route.levelPaths;
|
|
88
|
+
this.levelPoints = route === null || route === void 0 ? void 0 : route.levelPoints;
|
|
89
89
|
if (paths) {
|
|
90
90
|
lines = [];
|
|
91
91
|
for (_i = 0, _a = Object.entries(paths); _i < _a.length; _i++) {
|