@aibee/crc-bmap 0.0.69 → 0.0.71
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 +2 -2
- package/example/vite.config.ts +1 -1
- package/lib/bmap.cjs.min.js +1 -1
- package/lib/bmap.cjs.min.js.map +4 -4
- package/lib/bmap.esm.js +23 -11
- package/lib/bmap.esm.js.map +3 -3
- package/lib/bmap.esm.min.js +1 -1
- package/lib/bmap.esm.min.js.map +4 -4
- package/lib/bmap.min.js +1 -1
- package/lib/bmap.min.js.map +4 -4
- package/lib/src/elements/poi.d.ts +1 -0
- package/lib/src/utils/index.d.ts +2 -0
- package/lib/src/utils/keyboard.d.ts +1 -0
- package/lib/src/utils/os.d.ts +1 -0
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -455,6 +455,17 @@ function disposeLoader() {
|
|
|
455
455
|
modelMap.clear();
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
+
// src/utils/os.ts
|
|
459
|
+
var isMac = navigator.userAgent.toUpperCase().indexOf("MAC") >= 0;
|
|
460
|
+
|
|
461
|
+
// src/utils/keyboard.ts
|
|
462
|
+
function isControl(key) {
|
|
463
|
+
if (isMac) {
|
|
464
|
+
return key === "Meta";
|
|
465
|
+
}
|
|
466
|
+
return key === "Control";
|
|
467
|
+
}
|
|
468
|
+
|
|
458
469
|
// src/context.ts
|
|
459
470
|
import {
|
|
460
471
|
EventDispatcher as EventDispatcher6,
|
|
@@ -1057,21 +1068,21 @@ var Poi = class extends EventDispatcher2 {
|
|
|
1057
1068
|
return;
|
|
1058
1069
|
}
|
|
1059
1070
|
this.visible = visible;
|
|
1060
|
-
|
|
1061
|
-
this.overlay.visible = visible;
|
|
1062
|
-
this.overlay.div.style.visibility = visible ? "visible" : "hidden";
|
|
1063
|
-
}
|
|
1071
|
+
this.changeOverlayVisible(visible);
|
|
1064
1072
|
}
|
|
1065
|
-
|
|
1066
|
-
if (!this.visible) {
|
|
1067
|
-
return;
|
|
1068
|
-
}
|
|
1073
|
+
changeOverlayVisible(visible) {
|
|
1069
1074
|
if (visible === this.overlay.visible) {
|
|
1070
1075
|
return;
|
|
1071
1076
|
}
|
|
1072
1077
|
this.overlay.visible = visible;
|
|
1073
1078
|
this.overlay.div.style.visibility = visible ? "visible" : "hidden";
|
|
1074
1079
|
}
|
|
1080
|
+
parentSetVisible(visible) {
|
|
1081
|
+
if (!this.visible) {
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
this.changeOverlayVisible(visible);
|
|
1085
|
+
}
|
|
1075
1086
|
getBox() {
|
|
1076
1087
|
const { width, height } = this.size;
|
|
1077
1088
|
const { x, y } = this.overlay.clientPos;
|
|
@@ -1420,7 +1431,6 @@ var Model = class extends Object3D7 {
|
|
|
1420
1431
|
loadModel() {
|
|
1421
1432
|
return __async(this, null, function* () {
|
|
1422
1433
|
const object = yield loadModel(this.options.modelUrl);
|
|
1423
|
-
console.log(object);
|
|
1424
1434
|
object.scene.rotation.set(Math.PI / 2, Math.PI / 2, 0);
|
|
1425
1435
|
this.add(object.scene);
|
|
1426
1436
|
this.model = object;
|
|
@@ -2133,7 +2143,7 @@ var Selection = class extends EventDispatcher4 {
|
|
|
2133
2143
|
this.downPoint = null;
|
|
2134
2144
|
});
|
|
2135
2145
|
__publicField(this, "onKeyDown", (e) => {
|
|
2136
|
-
if (e.key
|
|
2146
|
+
if (isControl(e.key)) {
|
|
2137
2147
|
this.isMultipleSelect = true;
|
|
2138
2148
|
this.boxSelection.setEnable(true);
|
|
2139
2149
|
this.prevPanStatus = this.context.control.enablePan;
|
|
@@ -2143,7 +2153,7 @@ var Selection = class extends EventDispatcher4 {
|
|
|
2143
2153
|
}
|
|
2144
2154
|
});
|
|
2145
2155
|
__publicField(this, "onKeyUp", (e) => {
|
|
2146
|
-
if (e.key
|
|
2156
|
+
if (isControl(e.key)) {
|
|
2147
2157
|
this.isMultipleSelect = false;
|
|
2148
2158
|
this.boxSelection.setEnable(false);
|
|
2149
2159
|
this.context.control.enablePan = !!this.prevPanStatus;
|
|
@@ -3440,6 +3450,8 @@ export {
|
|
|
3440
3450
|
initScene,
|
|
3441
3451
|
initShape,
|
|
3442
3452
|
isContain,
|
|
3453
|
+
isControl,
|
|
3454
|
+
isMac,
|
|
3443
3455
|
loadModel,
|
|
3444
3456
|
proxyOptions,
|
|
3445
3457
|
setCirclePosition,
|