@aibee/crc-bmap 0.0.100 → 0.0.101
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/lib/bmap.cjs.min.js +1 -1
- package/lib/bmap.cjs.min.js.map +2 -2
- package/lib/bmap.esm.js +11 -4
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +3632 -5381
- package/lib/bmap.esm.min.js.map +2 -2
- package/lib/bmap.min.js +1 -1
- package/lib/bmap.min.js.map +2 -2
- package/lib/src/plugins/navigation/navigation.d.ts +1 -0
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -5194,6 +5194,12 @@ var Navigation = class extends Plugin {
|
|
|
5194
5194
|
triggerWorker(type, data) {
|
|
5195
5195
|
this.worker.postMessage({ type, data });
|
|
5196
5196
|
}
|
|
5197
|
+
clearPath() {
|
|
5198
|
+
if (this.path) {
|
|
5199
|
+
this.bmap.context.scene.remove(this.path);
|
|
5200
|
+
this.path = null;
|
|
5201
|
+
}
|
|
5202
|
+
}
|
|
5197
5203
|
onSwitchFloor = ({ data: { curFloor } }) => {
|
|
5198
5204
|
if (this.paths.length) {
|
|
5199
5205
|
const curFloorPathData = this.paths.find(
|
|
@@ -5202,11 +5208,10 @@ var Navigation = class extends Plugin {
|
|
|
5202
5208
|
if (curFloorPathData) {
|
|
5203
5209
|
this.renderPath(this.translatePoints(curFloorPathData.points));
|
|
5204
5210
|
} else {
|
|
5205
|
-
|
|
5206
|
-
this.bmap.context.scene.remove(this.path);
|
|
5207
|
-
this.path = null;
|
|
5208
|
-
}
|
|
5211
|
+
this.clearPath();
|
|
5209
5212
|
}
|
|
5213
|
+
} else {
|
|
5214
|
+
this.clearPath();
|
|
5210
5215
|
}
|
|
5211
5216
|
};
|
|
5212
5217
|
getDirectionPath(points) {
|
|
@@ -5240,6 +5245,8 @@ var Navigation = class extends Plugin {
|
|
|
5240
5245
|
};
|
|
5241
5246
|
this.bmap.addEventListener("center-change", onCenterChange);
|
|
5242
5247
|
}
|
|
5248
|
+
} else {
|
|
5249
|
+
this.clearPath();
|
|
5243
5250
|
}
|
|
5244
5251
|
}
|
|
5245
5252
|
translatePoints(points) {
|