@tmagic/stage 1.1.0-beta.6 → 1.1.0-beta.7

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.
@@ -913,11 +913,13 @@
913
913
  this.content.addEventListener("wheel", this.mouseWheelHandler);
914
914
  this.content.addEventListener("mousemove", this.highlightHandler);
915
915
  this.content.addEventListener("mouseleave", this.mouseLeaveHandler);
916
- KeyController__default.default.global.keydown("shift", (e) => {
916
+ const isMac = /mac os x/.test(navigator.userAgent.toLowerCase());
917
+ const ctrl = isMac ? "meta" : "ctrl";
918
+ KeyController__default.default.global.keydown(ctrl, (e) => {
917
919
  e.inputEvent.preventDefault();
918
920
  this.isMultiSelectStatus = true;
919
921
  });
920
- KeyController__default.default.global.keyup("shift", (e) => {
922
+ KeyController__default.default.global.keyup(ctrl, (e) => {
921
923
  e.inputEvent.preventDefault();
922
924
  this.isMultiSelectStatus = false;
923
925
  });
@@ -1171,14 +1173,18 @@
1171
1173
  this.update();
1172
1174
  });
1173
1175
  }
1174
- canSelect(el) {
1176
+ canSelect(el, stop) {
1175
1177
  if (el.className.includes(PAGE_CLASS)) {
1176
1178
  this.core.highlightedDom = void 0;
1177
1179
  this.core.highlightLayer.clearHighlight();
1180
+ stop();
1178
1181
  return false;
1179
1182
  }
1180
1183
  const currentTargetMode = getMode(el);
1181
1184
  let selectedDomMode = "";
1185
+ if (this.core.selectedDom?.className.includes(PAGE_CLASS)) {
1186
+ return true;
1187
+ }
1182
1188
  if (this.targetList.length === 0 && this.core.selectedDom) {
1183
1189
  selectedDomMode = getMode(this.core.selectedDom);
1184
1190
  } else if (this.targetList.length > 0) {
@@ -1446,7 +1452,7 @@
1446
1452
  if (!canSelectByProp)
1447
1453
  return false;
1448
1454
  if (this.mask.isMultiSelectStatus) {
1449
- return this.multiDr.canSelect(el);
1455
+ return this.multiDr.canSelect(el, stop);
1450
1456
  }
1451
1457
  return true;
1452
1458
  }