@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.
@@ -949,7 +949,7 @@
949
949
  this.mode = getMode(el);
950
950
  this.dragResizeHelper.updateShadowEl(el);
951
951
  this.dragResizeHelper.setMode(this.mode);
952
- const elementGuidelines = Array.prototype.slice.call(this.target?.parentElement?.children) || [];
952
+ const elementGuidelines = Array.from(this.target?.parentElement?.children || []);
953
953
  this.setElementGuidelines([this.target], elementGuidelines);
954
954
  return this.getOptions(false, {
955
955
  target: this.dragResizeHelper.getShadowEl()
@@ -1218,7 +1218,7 @@
1218
1218
  this.mode = getMode(els[0]);
1219
1219
  this.targetList = els;
1220
1220
  this.dragResizeHelper.updateGroup(els);
1221
- const elementGuidelines = Array.prototype.slice.call(this.targetList[0].parentElement?.children) || [];
1221
+ const elementGuidelines = Array.from(this.targetList[0].parentElement?.children || []);
1222
1222
  this.setElementGuidelines(this.targetList, elementGuidelines);
1223
1223
  this.moveableForMulti?.destroy();
1224
1224
  this.dragResizeHelper.clear();
@@ -1766,8 +1766,9 @@
1766
1766
  this.emit("select", this.selectedEl);
1767
1767
  }
1768
1768
  };
1769
- mouseLeaveHandler = () => {
1769
+ mouseLeaveHandler = (event) => {
1770
1770
  setTimeout(() => this.clearHighlight(), throttleTime);
1771
+ this.emit("mouseleave", event);
1771
1772
  };
1772
1773
  mouseWheelHandler = () => {
1773
1774
  this.clearHighlight();
@@ -2580,9 +2581,9 @@
2580
2581
  * 初始化Highlight类通过ActionManager抛出来的事件监听
2581
2582
  */
2582
2583
  initMouseEvent() {
2583
- this.actionManager.on("mousemove", async (event) => {
2584
+ this.actionManager.on("mousemove", (event) => {
2584
2585
  this.emit("mousemove", event);
2585
- }).on("mouseleave", async (event) => {
2586
+ }).on("mouseleave", (event) => {
2586
2587
  this.emit("mouseleave", event);
2587
2588
  }).on("drag-start", (e) => {
2588
2589
  this.emit("drag-start", e);