@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.
- package/dist/tmagic-stage.js +19 -13
- package/dist/tmagic-stage.js.map +1 -1
- package/dist/tmagic-stage.umd.cjs +19 -13
- package/dist/tmagic-stage.umd.cjs.map +1 -1
- package/package.json +4 -4
- package/src/StageDragResize.ts +2 -2
- package/src/StageHighlight.ts +18 -11
- package/src/StageMultiDragResize.ts +0 -2
- package/types/StageHighlight.d.ts +1 -1
package/dist/tmagic-stage.js
CHANGED
|
@@ -923,14 +923,14 @@ class StageDragResize extends MoveableOptionsManager {
|
|
|
923
923
|
Object.entries(options).forEach(([key, value]) => {
|
|
924
924
|
this.moveable[key] = value;
|
|
925
925
|
});
|
|
926
|
-
this.moveable.
|
|
926
|
+
this.moveable.updateRect();
|
|
927
927
|
}
|
|
928
928
|
clearSelectStatus() {
|
|
929
929
|
if (!this.moveable)
|
|
930
930
|
return;
|
|
931
931
|
this.dragResizeHelper.destroyShadowEl();
|
|
932
932
|
this.moveable.target = null;
|
|
933
|
-
this.moveable.
|
|
933
|
+
this.moveable.updateRect();
|
|
934
934
|
}
|
|
935
935
|
/**
|
|
936
936
|
* 销毁实例
|
|
@@ -1142,13 +1142,18 @@ class StageHighlight extends EventEmitter$1 {
|
|
|
1142
1142
|
if (!el || el === this.target)
|
|
1143
1143
|
return;
|
|
1144
1144
|
this.target = el;
|
|
1145
|
-
this.
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1145
|
+
this.targetShadow?.update(el);
|
|
1146
|
+
if (this.moveable) {
|
|
1147
|
+
this.moveable.zoom = 2;
|
|
1148
|
+
this.moveable.updateRect();
|
|
1149
|
+
} else {
|
|
1150
|
+
this.moveable = new Moveable(this.container, {
|
|
1151
|
+
target: this.targetShadow?.el,
|
|
1152
|
+
origin: false,
|
|
1153
|
+
rootContainer: this.getRootContainer(),
|
|
1154
|
+
zoom: 2
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1152
1157
|
}
|
|
1153
1158
|
/**
|
|
1154
1159
|
* 清空高亮
|
|
@@ -1156,16 +1161,18 @@ class StageHighlight extends EventEmitter$1 {
|
|
|
1156
1161
|
clearHighlight() {
|
|
1157
1162
|
if (!this.moveable || !this.target)
|
|
1158
1163
|
return;
|
|
1164
|
+
this.moveable.zoom = 0;
|
|
1165
|
+
this.moveable.updateRect();
|
|
1159
1166
|
this.target = void 0;
|
|
1160
|
-
this.moveable.target = null;
|
|
1161
|
-
this.moveable.updateTarget();
|
|
1162
1167
|
}
|
|
1163
1168
|
/**
|
|
1164
1169
|
* 销毁实例
|
|
1165
1170
|
*/
|
|
1166
1171
|
destroy() {
|
|
1167
1172
|
this.moveable?.destroy();
|
|
1168
|
-
this.targetShadow
|
|
1173
|
+
this.targetShadow?.destroy();
|
|
1174
|
+
this.moveable = void 0;
|
|
1175
|
+
this.targetShadow = void 0;
|
|
1169
1176
|
}
|
|
1170
1177
|
}
|
|
1171
1178
|
|
|
@@ -1278,7 +1285,6 @@ class StageMultiDragResize extends MoveableOptionsManager {
|
|
|
1278
1285
|
const options = this.getOptions(true, {
|
|
1279
1286
|
target: this.dragResizeHelper.getShadowEls()
|
|
1280
1287
|
});
|
|
1281
|
-
console.log(options);
|
|
1282
1288
|
Object.entries(options).forEach(([key, value]) => {
|
|
1283
1289
|
this.moveableForMulti[key] = value;
|
|
1284
1290
|
});
|