@tmagic/stage 1.3.0-alpha.19 → 1.3.0-alpha.20

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.
@@ -920,14 +920,14 @@
920
920
  Object.entries(options).forEach(([key, value]) => {
921
921
  this.moveable[key] = value;
922
922
  });
923
- this.moveable.updateTarget();
923
+ this.moveable.updateRect();
924
924
  }
925
925
  clearSelectStatus() {
926
926
  if (!this.moveable)
927
927
  return;
928
928
  this.dragResizeHelper.destroyShadowEl();
929
929
  this.moveable.target = null;
930
- this.moveable.updateTarget();
930
+ this.moveable.updateRect();
931
931
  }
932
932
  /**
933
933
  * 销毁实例
@@ -1139,13 +1139,18 @@
1139
1139
  if (!el || el === this.target)
1140
1140
  return;
1141
1141
  this.target = el;
1142
- this.moveable?.destroy();
1143
- this.moveable = new Moveable(this.container, {
1144
- target: this.targetShadow.update(el),
1145
- origin: false,
1146
- rootContainer: this.getRootContainer(),
1147
- zoom: 2
1148
- });
1142
+ this.targetShadow?.update(el);
1143
+ if (this.moveable) {
1144
+ this.moveable.zoom = 2;
1145
+ this.moveable.updateRect();
1146
+ } else {
1147
+ this.moveable = new Moveable(this.container, {
1148
+ target: this.targetShadow?.el,
1149
+ origin: false,
1150
+ rootContainer: this.getRootContainer(),
1151
+ zoom: 2
1152
+ });
1153
+ }
1149
1154
  }
1150
1155
  /**
1151
1156
  * 清空高亮
@@ -1153,16 +1158,18 @@
1153
1158
  clearHighlight() {
1154
1159
  if (!this.moveable || !this.target)
1155
1160
  return;
1161
+ this.moveable.zoom = 0;
1162
+ this.moveable.updateRect();
1156
1163
  this.target = void 0;
1157
- this.moveable.target = null;
1158
- this.moveable.updateTarget();
1159
1164
  }
1160
1165
  /**
1161
1166
  * 销毁实例
1162
1167
  */
1163
1168
  destroy() {
1164
1169
  this.moveable?.destroy();
1165
- this.targetShadow.destroy();
1170
+ this.targetShadow?.destroy();
1171
+ this.moveable = void 0;
1172
+ this.targetShadow = void 0;
1166
1173
  }
1167
1174
  }
1168
1175
 
@@ -1275,7 +1282,6 @@
1275
1282
  const options = this.getOptions(true, {
1276
1283
  target: this.dragResizeHelper.getShadowEls()
1277
1284
  });
1278
- console.log(options);
1279
1285
  Object.entries(options).forEach(([key, value]) => {
1280
1286
  this.moveableForMulti[key] = value;
1281
1287
  });