@aibee/crc-bmap 0.0.70 → 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/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 +15 -2
- 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/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,
|
|
@@ -2132,7 +2143,7 @@ var Selection = class extends EventDispatcher4 {
|
|
|
2132
2143
|
this.downPoint = null;
|
|
2133
2144
|
});
|
|
2134
2145
|
__publicField(this, "onKeyDown", (e) => {
|
|
2135
|
-
if (e.key
|
|
2146
|
+
if (isControl(e.key)) {
|
|
2136
2147
|
this.isMultipleSelect = true;
|
|
2137
2148
|
this.boxSelection.setEnable(true);
|
|
2138
2149
|
this.prevPanStatus = this.context.control.enablePan;
|
|
@@ -2142,7 +2153,7 @@ var Selection = class extends EventDispatcher4 {
|
|
|
2142
2153
|
}
|
|
2143
2154
|
});
|
|
2144
2155
|
__publicField(this, "onKeyUp", (e) => {
|
|
2145
|
-
if (e.key
|
|
2156
|
+
if (isControl(e.key)) {
|
|
2146
2157
|
this.isMultipleSelect = false;
|
|
2147
2158
|
this.boxSelection.setEnable(false);
|
|
2148
2159
|
this.context.control.enablePan = !!this.prevPanStatus;
|
|
@@ -3439,6 +3450,8 @@ export {
|
|
|
3439
3450
|
initScene,
|
|
3440
3451
|
initShape,
|
|
3441
3452
|
isContain,
|
|
3453
|
+
isControl,
|
|
3454
|
+
isMac,
|
|
3442
3455
|
loadModel,
|
|
3443
3456
|
proxyOptions,
|
|
3444
3457
|
setCirclePosition,
|