@aibee/crc-bmap 0.0.107 → 0.0.108
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 +3 -3
- package/lib/bmap.cjs.min.js.map +3 -3
- package/lib/bmap.esm.js +34 -7
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +3 -3
- package/lib/bmap.esm.min.js.map +3 -3
- package/lib/bmap.min.js +3 -3
- package/lib/bmap.min.js.map +3 -3
- package/lib/src/context.d.ts +1 -1
- package/lib/src/operations/hover/hover-helper.d.ts +1 -0
- package/lib/src/plugins/navigation/path.d.ts +1 -0
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -2791,9 +2791,18 @@ var HoverHelper = class extends EventDispatcher5 {
|
|
|
2791
2791
|
}
|
|
2792
2792
|
};
|
|
2793
2793
|
onPointerLevel = () => {
|
|
2794
|
+
console.log("level");
|
|
2794
2795
|
this.curGraphics.clear();
|
|
2795
2796
|
this.handleHoverGraphicsChange();
|
|
2796
2797
|
};
|
|
2798
|
+
onBodyPointerMove = (e) => {
|
|
2799
|
+
if (this.curGraphics.size) {
|
|
2800
|
+
const rect = this.context.container.getBoundingClientRect();
|
|
2801
|
+
if (e.clientX < rect.left || e.clientX > rect.right || e.clientY < rect.top || e.clientY > rect.bottom) {
|
|
2802
|
+
this.onPointerLevel();
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
};
|
|
2797
2806
|
handleHoverGraphicsChange(graphics = this.curGraphics) {
|
|
2798
2807
|
this.dispatchEvent({ type: "hover-change", graphics: Array.from(graphics) });
|
|
2799
2808
|
}
|
|
@@ -2801,11 +2810,13 @@ var HoverHelper = class extends EventDispatcher5 {
|
|
|
2801
2810
|
this.context.addEventListener("pointer-over", this.onPointerMove);
|
|
2802
2811
|
this.context.addEventListener("pointer-move", this.onPointerMove);
|
|
2803
2812
|
this.context.addEventListener("pointer-level", this.onPointerLevel);
|
|
2813
|
+
document.body.addEventListener("pointermove", this.onBodyPointerMove);
|
|
2804
2814
|
}
|
|
2805
2815
|
unRegistryEvent() {
|
|
2806
2816
|
this.context.removeEventListener("pointer-over", this.onPointerMove);
|
|
2807
2817
|
this.context.removeEventListener("pointer-move", this.onPointerMove);
|
|
2808
2818
|
this.context.removeEventListener("pointer-level", this.onPointerLevel);
|
|
2819
|
+
document.body.removeEventListener("pointermove", this.onBodyPointerMove);
|
|
2809
2820
|
}
|
|
2810
2821
|
dispose() {
|
|
2811
2822
|
this.unRegistryEvent();
|
|
@@ -3219,7 +3230,8 @@ var Context = class extends EventDispatcher6 {
|
|
|
3219
3230
|
const pois = this.getPoisByDeviceXy(e.offsetX, e.offsetY);
|
|
3220
3231
|
this.dispatchEvent({ type: "pointer-move", e, graphics, pois, position });
|
|
3221
3232
|
};
|
|
3222
|
-
onPointerleave = () => {
|
|
3233
|
+
onPointerleave = (e) => {
|
|
3234
|
+
console.log(e.type);
|
|
3223
3235
|
this.dispatchEvent({ type: "pointer-level" });
|
|
3224
3236
|
};
|
|
3225
3237
|
onSelectionSelect = ({ graphics, isMultipleSelect }) => {
|
|
@@ -3234,6 +3246,8 @@ var Context = class extends EventDispatcher6 {
|
|
|
3234
3246
|
this.container.addEventListener("pointerover", this.onPointerover);
|
|
3235
3247
|
this.container.addEventListener("pointermove", this.onPointermove);
|
|
3236
3248
|
this.container.addEventListener("pointerleave", this.onPointerleave);
|
|
3249
|
+
this.container.addEventListener("pointercancel", this.onPointerleave);
|
|
3250
|
+
this.container.addEventListener("pointerout", this.onPointerleave);
|
|
3237
3251
|
this.selection.addEventListener("select", this.onSelectionSelect);
|
|
3238
3252
|
this.hoverHelper.addEventListener("hover-change", this.onHoverChange);
|
|
3239
3253
|
}
|
|
@@ -3243,6 +3257,8 @@ var Context = class extends EventDispatcher6 {
|
|
|
3243
3257
|
this.container.removeEventListener("pointerover", this.onPointerover);
|
|
3244
3258
|
this.container.removeEventListener("pointermove", this.onPointermove);
|
|
3245
3259
|
this.container.removeEventListener("pointerleave", this.onPointerleave);
|
|
3260
|
+
this.container.removeEventListener("pointercancel", this.onPointerleave);
|
|
3261
|
+
this.container.removeEventListener("pointerout", this.onPointerleave);
|
|
3246
3262
|
this.selection.removeEventListener("select", this.onSelectionSelect);
|
|
3247
3263
|
this.hoverHelper.removeEventListener("hover-change", this.onHoverChange);
|
|
3248
3264
|
}
|
|
@@ -3285,12 +3301,21 @@ var Context = class extends EventDispatcher6 {
|
|
|
3285
3301
|
* @param azimuthal 弧度
|
|
3286
3302
|
*/
|
|
3287
3303
|
setAzimuthalAngle(azimuthal, duration = 500) {
|
|
3304
|
+
const { maxAzimuthAngle, minAzimuthAngle } = this.control;
|
|
3305
|
+
const disable = maxAzimuthAngle === minAzimuthAngle;
|
|
3306
|
+
if (!disable) {
|
|
3307
|
+
if (azimuthal > maxAzimuthAngle && azimuthal < minAzimuthAngle) {
|
|
3308
|
+
return;
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3288
3311
|
if (duration === 0) {
|
|
3289
3312
|
this.control.maxAzimuthAngle = azimuthal;
|
|
3290
3313
|
this.control.minAzimuthAngle = azimuthal;
|
|
3291
3314
|
this.control.update();
|
|
3292
|
-
|
|
3293
|
-
|
|
3315
|
+
if (!disable) {
|
|
3316
|
+
this.control.maxAzimuthAngle = maxAzimuthAngle;
|
|
3317
|
+
this.control.minAzimuthAngle = minAzimuthAngle;
|
|
3318
|
+
}
|
|
3294
3319
|
return;
|
|
3295
3320
|
}
|
|
3296
3321
|
return timeoutPromise(
|
|
@@ -3303,8 +3328,10 @@ var Context = class extends EventDispatcher6 {
|
|
|
3303
3328
|
this.control.update();
|
|
3304
3329
|
}).onComplete(() => {
|
|
3305
3330
|
this.control.enabled = true;
|
|
3306
|
-
|
|
3307
|
-
|
|
3331
|
+
if (!disable) {
|
|
3332
|
+
this.control.maxAzimuthAngle = maxAzimuthAngle;
|
|
3333
|
+
this.control.minAzimuthAngle = minAzimuthAngle;
|
|
3334
|
+
}
|
|
3308
3335
|
this.tweenGroup.remove(tween);
|
|
3309
3336
|
resolve(true);
|
|
3310
3337
|
}).onStart(() => {
|
|
@@ -4942,7 +4969,7 @@ var arrow_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAMAA
|
|
|
4942
4969
|
// src/plugins/navigation/path.ts
|
|
4943
4970
|
var defaultConfig2 = {
|
|
4944
4971
|
texture_url: arrow_default,
|
|
4945
|
-
lineWidth:
|
|
4972
|
+
lineWidth: 8,
|
|
4946
4973
|
color: 16777215
|
|
4947
4974
|
};
|
|
4948
4975
|
var Path2 = class extends Object3D11 {
|
|
@@ -5045,7 +5072,7 @@ var Path2 = class extends Object3D11 {
|
|
|
5045
5072
|
),
|
|
5046
5073
|
depthTest: true,
|
|
5047
5074
|
sizeAttenuation: false,
|
|
5048
|
-
lineWidth: this.config.lineWidth,
|
|
5075
|
+
lineWidth: this.config.lineWidth * 2,
|
|
5049
5076
|
map: this.texture,
|
|
5050
5077
|
blending: NormalBlending,
|
|
5051
5078
|
repeat: new Vector25(this.getRepeat(), 1)
|