@aibee/crc-bmap 0.0.54 → 0.0.56
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/index.html +4 -2
- package/example/src/main.ts +13 -1
- package/lib/bmap.cjs.min.js +1 -1
- package/lib/bmap.cjs.min.js.map +3 -3
- package/lib/bmap.esm.js +10 -0
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +1 -1
- package/lib/bmap.esm.min.js.map +3 -3
- package/lib/bmap.min.js +1 -1
- package/lib/bmap.min.js.map +3 -3
- package/lib/src/config.d.ts +1 -0
- package/lib/src/context.d.ts +1 -0
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -2153,6 +2153,7 @@ var Context = class extends EventDispatcher6 {
|
|
|
2153
2153
|
__publicField(this, "basicRatio");
|
|
2154
2154
|
// zoom=1的时候,100M对应的像素个数
|
|
2155
2155
|
__publicField(this, "materialFactory");
|
|
2156
|
+
__publicField(this, "observe", null);
|
|
2156
2157
|
__publicField(this, "clientSize", {
|
|
2157
2158
|
width: 0,
|
|
2158
2159
|
height: 0
|
|
@@ -2298,8 +2299,14 @@ var Context = class extends EventDispatcher6 {
|
|
|
2298
2299
|
this.container.addEventListener("pointerleave", this.onPointerleave);
|
|
2299
2300
|
this.selection.addEventListener("select", this.onSelectionSelect);
|
|
2300
2301
|
this.hoverHelper.addEventListener("hover-change", this.onHoverChange);
|
|
2302
|
+
if (this.config.resizeObserver) {
|
|
2303
|
+
const observe = new ResizeObserver(this.onWindowResize);
|
|
2304
|
+
observe.observe(this.container);
|
|
2305
|
+
this.observe = observe;
|
|
2306
|
+
}
|
|
2301
2307
|
}
|
|
2302
2308
|
unRegistryEvent() {
|
|
2309
|
+
var _a;
|
|
2303
2310
|
window.removeEventListener("resize", this.onWindowResize);
|
|
2304
2311
|
this.container.removeEventListener("click", this.onClick);
|
|
2305
2312
|
this.container.removeEventListener("pointerover", this.onPointerover);
|
|
@@ -2307,6 +2314,8 @@ var Context = class extends EventDispatcher6 {
|
|
|
2307
2314
|
this.container.removeEventListener("pointerleave", this.onPointerleave);
|
|
2308
2315
|
this.selection.removeEventListener("select", this.onSelectionSelect);
|
|
2309
2316
|
this.hoverHelper.removeEventListener("hover-change", this.onHoverChange);
|
|
2317
|
+
(_a = this.observe) == null ? void 0 : _a.disconnect();
|
|
2318
|
+
this.observe = null;
|
|
2310
2319
|
}
|
|
2311
2320
|
/**
|
|
2312
2321
|
* 设置纵向旋转角度
|
|
@@ -2516,6 +2525,7 @@ var defaultConfig = {
|
|
|
2516
2525
|
floorGraphic: "/api/inception-map/floor/get",
|
|
2517
2526
|
floorRange: "/api/inception-map/range/get"
|
|
2518
2527
|
},
|
|
2528
|
+
resizeObserver: false,
|
|
2519
2529
|
heatMap: {
|
|
2520
2530
|
radius: 50,
|
|
2521
2531
|
gradient: {
|