@aibee/crc-bmap 0.0.20 → 0.0.21
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/example/src/main.ts +3 -46
- package/lib/bmap.cjs.min.js +2 -2
- package/lib/bmap.cjs.min.js.map +2 -2
- package/lib/bmap.esm.js +17 -14
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +1 -1
- package/lib/bmap.esm.min.js.map +2 -2
- package/lib/bmap.min.js +2 -2
- package/lib/bmap.min.js.map +2 -2
- package/lib/src/types/index.d.ts +1 -0
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -2237,6 +2237,7 @@ var BMap = class extends EventDispatcher6 {
|
|
|
2237
2237
|
const [x, y] = item.info.geometry.cds;
|
|
2238
2238
|
item.info.geometry.cds = [x - center2[0], y - center2[1]];
|
|
2239
2239
|
}
|
|
2240
|
+
item.info.transformToBuildingGround = true;
|
|
2240
2241
|
});
|
|
2241
2242
|
}
|
|
2242
2243
|
if (!this.config.useFloorCache) {
|
|
@@ -2486,20 +2487,22 @@ var BMap = class extends EventDispatcher6 {
|
|
|
2486
2487
|
}
|
|
2487
2488
|
createGraphicByOptions(options) {
|
|
2488
2489
|
var _a;
|
|
2489
|
-
if (
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
options.geometry.
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
coord
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2490
|
+
if (!options.transformToBuildingGround) {
|
|
2491
|
+
if (this.currentBuildGround) {
|
|
2492
|
+
const center2 = getCenter(this.currentBuildGround.info.geometry.cds[0]);
|
|
2493
|
+
if (options.geometry.type === "polygon") {
|
|
2494
|
+
options.geometry.cds.map((cds) => {
|
|
2495
|
+
if (Array.isArray(cds)) {
|
|
2496
|
+
cds.forEach((coord) => {
|
|
2497
|
+
coord[0] -= center2[0];
|
|
2498
|
+
coord[1] -= center2[1];
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
});
|
|
2502
|
+
} else {
|
|
2503
|
+
const [x, y] = options.geometry.cds;
|
|
2504
|
+
options.geometry.cds = [x - center2[0], y - center2[1]];
|
|
2505
|
+
}
|
|
2503
2506
|
}
|
|
2504
2507
|
}
|
|
2505
2508
|
return (_a = this.context.currentFloor) == null ? void 0 : _a.graphicLayer.createGraphic(options);
|