@tmagic/stage 1.2.0-beta.25 → 1.2.0-beta.26
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 +5 -1
- package/dist/tmagic-stage.js.map +1 -1
- package/dist/tmagic-stage.umd.cjs +5 -1
- package/dist/tmagic-stage.umd.cjs.map +1 -1
- package/package.json +4 -4
- package/src/ActionManager.ts +1 -0
- package/src/StageCore.ts +1 -0
- package/src/StageDragResize.ts +3 -1
- package/src/types.ts +3 -0
- package/types/StageDragResize.d.ts +1 -0
- package/types/types.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.0-beta.
|
|
2
|
+
"version": "1.2.0-beta.26",
|
|
3
3
|
"name": "@tmagic/stage",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@scena/guides": "^0.17.0",
|
|
33
|
-
"@tmagic/core": "1.2.0-beta.
|
|
34
|
-
"@tmagic/schema": "1.2.0-beta.
|
|
35
|
-
"@tmagic/utils": "1.2.0-beta.
|
|
33
|
+
"@tmagic/core": "1.2.0-beta.26",
|
|
34
|
+
"@tmagic/schema": "1.2.0-beta.26",
|
|
35
|
+
"@tmagic/utils": "1.2.0-beta.26",
|
|
36
36
|
"events": "^3.3.0",
|
|
37
37
|
"keycon": "^1.1.2",
|
|
38
38
|
"lodash-es": "^4.17.21",
|
package/src/ActionManager.ts
CHANGED
|
@@ -102,6 +102,7 @@ export default class ActionManager extends EventEmitter {
|
|
|
102
102
|
|
|
103
103
|
this.dr = new StageDragResize({
|
|
104
104
|
container: config.container,
|
|
105
|
+
disabledDragStart: config.disabledDragStart,
|
|
105
106
|
getRootContainer: config.getRootContainer,
|
|
106
107
|
getRenderDocument: config.getRenderDocument,
|
|
107
108
|
updateDragEl: config.updateDragEl,
|
package/src/StageCore.ts
CHANGED
|
@@ -241,6 +241,7 @@ export default class StageCore extends EventEmitter {
|
|
|
241
241
|
moveableOptions: config.moveableOptions,
|
|
242
242
|
multiMoveableOptions: config.multiMoveableOptions,
|
|
243
243
|
container: this.mask.content,
|
|
244
|
+
disabledDragStart: config.disabledDragStart,
|
|
244
245
|
canSelect: config.canSelect,
|
|
245
246
|
isContainer: config.isContainer,
|
|
246
247
|
updateDragEl: config.updateDragEl,
|
package/src/StageDragResize.ts
CHANGED
|
@@ -38,6 +38,7 @@ export default class StageDragResize extends MoveableOptionsManager {
|
|
|
38
38
|
/** 拖动状态 */
|
|
39
39
|
private dragStatus: StageDragStatus = StageDragStatus.END;
|
|
40
40
|
private dragResizeHelper: DragResizeHelper;
|
|
41
|
+
private disabledDragStart?: boolean;
|
|
41
42
|
private getRenderDocument: GetRenderDocument;
|
|
42
43
|
private markContainerEnd: MarkContainerEnd;
|
|
43
44
|
private delayedMarkContainer: DelayedMarkContainer;
|
|
@@ -48,6 +49,7 @@ export default class StageDragResize extends MoveableOptionsManager {
|
|
|
48
49
|
this.getRenderDocument = config.getRenderDocument;
|
|
49
50
|
this.markContainerEnd = config.markContainerEnd;
|
|
50
51
|
this.delayedMarkContainer = config.delayedMarkContainer;
|
|
52
|
+
this.disabledDragStart = config.disabledDragStart;
|
|
51
53
|
|
|
52
54
|
this.dragResizeHelper = new DragResizeHelper({
|
|
53
55
|
container: config.container,
|
|
@@ -75,7 +77,7 @@ export default class StageDragResize extends MoveableOptionsManager {
|
|
|
75
77
|
this.updateMoveable(el);
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
if (event) {
|
|
80
|
+
if (event && !this.disabledDragStart) {
|
|
79
81
|
this.moveable?.dragStart(event);
|
|
80
82
|
}
|
|
81
83
|
}
|
package/src/types.ts
CHANGED
|
@@ -70,6 +70,7 @@ export interface StageCoreConfig {
|
|
|
70
70
|
render?: (renderer: StageCore) => Promise<HTMLElement> | HTMLElement;
|
|
71
71
|
autoScrollIntoView?: boolean;
|
|
72
72
|
updateDragEl?: UpdateDragEl;
|
|
73
|
+
disabledDragStart?: boolean;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
export interface ActionManagerConfig {
|
|
@@ -79,6 +80,7 @@ export interface ActionManagerConfig {
|
|
|
79
80
|
containerHighlightType?: ContainerHighlightType;
|
|
80
81
|
moveableOptions?: CustomizeMoveableOptions;
|
|
81
82
|
multiMoveableOptions?: CustomizeMoveableOptions;
|
|
83
|
+
disabledDragStart?: boolean;
|
|
82
84
|
canSelect?: CanSelect;
|
|
83
85
|
isContainer: IsContainer;
|
|
84
86
|
getRootContainer: GetRootContainer;
|
|
@@ -111,6 +113,7 @@ export interface StageMaskConfig {
|
|
|
111
113
|
export interface StageDragResizeConfig {
|
|
112
114
|
container: HTMLElement;
|
|
113
115
|
moveableOptions?: CustomizeMoveableOptions;
|
|
116
|
+
disabledDragStart?: boolean;
|
|
114
117
|
getRootContainer: GetRootContainer;
|
|
115
118
|
getRenderDocument: GetRenderDocument;
|
|
116
119
|
markContainerEnd: MarkContainerEnd;
|
package/types/types.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export interface StageCoreConfig {
|
|
|
43
43
|
render?: (renderer: StageCore) => Promise<HTMLElement> | HTMLElement;
|
|
44
44
|
autoScrollIntoView?: boolean;
|
|
45
45
|
updateDragEl?: UpdateDragEl;
|
|
46
|
+
disabledDragStart?: boolean;
|
|
46
47
|
}
|
|
47
48
|
export interface ActionManagerConfig {
|
|
48
49
|
container: HTMLElement;
|
|
@@ -51,6 +52,7 @@ export interface ActionManagerConfig {
|
|
|
51
52
|
containerHighlightType?: ContainerHighlightType;
|
|
52
53
|
moveableOptions?: CustomizeMoveableOptions;
|
|
53
54
|
multiMoveableOptions?: CustomizeMoveableOptions;
|
|
55
|
+
disabledDragStart?: boolean;
|
|
54
56
|
canSelect?: CanSelect;
|
|
55
57
|
isContainer: IsContainer;
|
|
56
58
|
getRootContainer: GetRootContainer;
|
|
@@ -78,6 +80,7 @@ export interface StageMaskConfig {
|
|
|
78
80
|
export interface StageDragResizeConfig {
|
|
79
81
|
container: HTMLElement;
|
|
80
82
|
moveableOptions?: CustomizeMoveableOptions;
|
|
83
|
+
disabledDragStart?: boolean;
|
|
81
84
|
getRootContainer: GetRootContainer;
|
|
82
85
|
getRenderDocument: GetRenderDocument;
|
|
83
86
|
markContainerEnd: MarkContainerEnd;
|