@tmagic/stage 1.3.0-beta.1 → 1.3.0-beta.3

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.
@@ -952,7 +952,7 @@ class StageDragResize extends MoveableOptionsManager {
952
952
  this.mode = getMode(el);
953
953
  this.dragResizeHelper.updateShadowEl(el);
954
954
  this.dragResizeHelper.setMode(this.mode);
955
- const elementGuidelines = Array.prototype.slice.call(this.target?.parentElement?.children) || [];
955
+ const elementGuidelines = Array.from(this.target?.parentElement?.children || []);
956
956
  this.setElementGuidelines([this.target], elementGuidelines);
957
957
  return this.getOptions(false, {
958
958
  target: this.dragResizeHelper.getShadowEl()
@@ -1221,7 +1221,7 @@ class StageMultiDragResize extends MoveableOptionsManager {
1221
1221
  this.mode = getMode(els[0]);
1222
1222
  this.targetList = els;
1223
1223
  this.dragResizeHelper.updateGroup(els);
1224
- const elementGuidelines = Array.prototype.slice.call(this.targetList[0].parentElement?.children) || [];
1224
+ const elementGuidelines = Array.from(this.targetList[0].parentElement?.children || []);
1225
1225
  this.setElementGuidelines(this.targetList, elementGuidelines);
1226
1226
  this.moveableForMulti?.destroy();
1227
1227
  this.dragResizeHelper.clear();
@@ -1769,8 +1769,9 @@ class ActionManager extends EventEmitter {
1769
1769
  this.emit("select", this.selectedEl);
1770
1770
  }
1771
1771
  };
1772
- mouseLeaveHandler = () => {
1772
+ mouseLeaveHandler = (event) => {
1773
1773
  setTimeout(() => this.clearHighlight(), throttleTime);
1774
+ this.emit("mouseleave", event);
1774
1775
  };
1775
1776
  mouseWheelHandler = () => {
1776
1777
  this.clearHighlight();
@@ -2583,9 +2584,9 @@ class StageCore extends EventEmitter$1 {
2583
2584
  * 初始化Highlight类通过ActionManager抛出来的事件监听
2584
2585
  */
2585
2586
  initMouseEvent() {
2586
- this.actionManager.on("mousemove", async (event) => {
2587
+ this.actionManager.on("mousemove", (event) => {
2587
2588
  this.emit("mousemove", event);
2588
- }).on("mouseleave", async (event) => {
2589
+ }).on("mouseleave", (event) => {
2589
2590
  this.emit("mouseleave", event);
2590
2591
  }).on("drag-start", (e) => {
2591
2592
  this.emit("drag-start", e);