@idraw/core 0.4.0-beta.4 → 0.4.0-beta.40
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/esm/board/index.d.ts +46 -0
- package/dist/esm/board/index.js +371 -0
- package/dist/esm/board/sharer.d.ts +21 -0
- package/dist/esm/board/sharer.js +101 -0
- package/dist/esm/board/viewer.d.ts +32 -0
- package/dist/esm/board/viewer.js +165 -0
- package/dist/esm/board/watcher.d.ts +15 -0
- package/dist/esm/board/watcher.js +218 -0
- package/dist/esm/config.d.ts +28 -0
- package/dist/esm/config.js +34 -0
- package/dist/esm/index.d.ts +23 -9
- package/dist/esm/index.js +36 -12
- package/dist/esm/lib/cursor-image.d.ts +1 -0
- package/dist/esm/lib/cursor-image.js +1 -0
- package/dist/esm/lib/cursor.d.ts +3 -12
- package/dist/esm/lib/cursor.js +137 -112
- package/dist/esm/middleware/dragger/index.d.ts +2 -2
- package/dist/esm/middleware/dragger/index.js +5 -3
- package/dist/esm/middleware/info/config.d.ts +5 -0
- package/dist/esm/middleware/info/config.js +9 -0
- package/dist/esm/middleware/info/draw-info.d.ts +29 -0
- package/dist/esm/middleware/info/draw-info.js +113 -0
- package/dist/esm/middleware/info/index.d.ts +9 -0
- package/dist/esm/middleware/info/index.js +131 -0
- package/dist/esm/middleware/info/types.d.ts +3 -0
- package/dist/esm/middleware/info/types.js +1 -0
- package/dist/esm/middleware/layout-selector/config.d.ts +11 -0
- package/dist/esm/middleware/layout-selector/config.js +12 -0
- package/dist/esm/middleware/layout-selector/index.d.ts +5 -0
- package/dist/esm/middleware/layout-selector/index.js +349 -0
- package/dist/esm/middleware/layout-selector/types.d.ts +17 -0
- package/dist/esm/middleware/layout-selector/types.js +2 -0
- package/dist/esm/middleware/layout-selector/util.d.ts +9 -0
- package/dist/esm/middleware/layout-selector/util.js +63 -0
- package/dist/esm/middleware/pointer/index.d.ts +3 -0
- package/dist/esm/middleware/pointer/index.js +43 -0
- package/dist/esm/middleware/pointer/types.d.ts +3 -0
- package/dist/esm/middleware/pointer/types.js +1 -0
- package/dist/esm/middleware/ruler/config.d.ts +7 -0
- package/dist/esm/middleware/ruler/config.js +21 -0
- package/dist/esm/middleware/ruler/index.d.ts +3 -3
- package/dist/esm/middleware/ruler/index.js +33 -14
- package/dist/esm/middleware/ruler/types.d.ts +3 -0
- package/dist/esm/middleware/ruler/types.js +1 -0
- package/dist/esm/middleware/ruler/util.d.ts +20 -4
- package/dist/esm/middleware/ruler/util.js +97 -25
- package/dist/esm/middleware/scaler/index.d.ts +2 -3
- package/dist/esm/middleware/scaler/index.js +3 -2
- package/dist/esm/middleware/scroller/config.d.ts +4 -0
- package/dist/esm/middleware/scroller/config.js +10 -0
- package/dist/esm/middleware/scroller/index.d.ts +3 -2
- package/dist/esm/middleware/scroller/index.js +48 -6
- package/dist/esm/middleware/scroller/types.d.ts +11 -0
- package/dist/esm/middleware/scroller/types.js +1 -0
- package/dist/esm/middleware/scroller/util.d.ts +3 -2
- package/dist/esm/middleware/scroller/util.js +32 -43
- package/dist/esm/middleware/selector/config.d.ts +9 -1
- package/dist/esm/middleware/selector/config.js +17 -1
- package/dist/esm/middleware/selector/draw-auxiliary.d.ts +1 -0
- package/dist/esm/middleware/selector/draw-auxiliary.js +12 -0
- package/dist/esm/middleware/selector/draw-base.d.ts +30 -0
- package/dist/esm/middleware/selector/draw-base.js +100 -0
- package/dist/esm/middleware/selector/draw-debug.d.ts +5 -0
- package/dist/esm/middleware/selector/draw-debug.js +30 -0
- package/dist/esm/middleware/selector/draw-reference.d.ts +7 -0
- package/dist/esm/middleware/selector/draw-reference.js +31 -0
- package/dist/esm/middleware/selector/draw-wrapper.d.ts +16 -1
- package/dist/esm/middleware/selector/draw-wrapper.js +57 -35
- package/dist/esm/middleware/selector/index.d.ts +11 -4
- package/dist/esm/middleware/selector/index.js +420 -70
- package/dist/esm/middleware/selector/pattern/icon-rotate.d.ts +4 -0
- package/dist/esm/middleware/selector/pattern/icon-rotate.js +88 -0
- package/dist/esm/middleware/selector/pattern/index.d.ts +8 -0
- package/dist/esm/middleware/selector/pattern/index.js +38 -0
- package/dist/esm/middleware/selector/reference.d.ts +13 -0
- package/dist/esm/middleware/selector/reference.js +267 -0
- package/dist/esm/middleware/selector/types.d.ts +10 -4
- package/dist/esm/middleware/selector/types.js +2 -1
- package/dist/esm/middleware/selector/util.d.ts +14 -7
- package/dist/esm/middleware/selector/util.js +45 -43
- package/dist/esm/middleware/text-editor/index.d.ts +20 -3
- package/dist/esm/middleware/text-editor/index.js +96 -19
- package/dist/index.global.js +4765 -1466
- package/dist/index.global.min.js +1 -1
- package/package.json +5 -6
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import { getViewScaleInfoFromSnapshot, getViewSizeInfoFromSnapshot } from '@idraw/util';
|
|
2
|
-
import { keyActivePoint, keyActiveThumbType, keyPrevPoint, keyXThumbRect, keyYThumbRect } from './config';
|
|
3
|
-
const minScrollerWidth = 12;
|
|
2
|
+
import { keyActivePoint, keyActiveThumbType, keyPrevPoint, keyXThumbRect, keyYThumbRect, keyHoverXThumbRect, keyHoverYThumbRect } from './config';
|
|
4
3
|
const scrollerLineWidth = 16;
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
thumbColor: '#000000AA',
|
|
9
|
-
scrollBarColor: '#FFFFFF60',
|
|
10
|
-
showScrollBar: false
|
|
11
|
-
};
|
|
12
|
-
function isPointAtRect(helperContext, p, rect) {
|
|
13
|
-
const ctx = helperContext;
|
|
4
|
+
const minThumbLength = scrollerLineWidth * 2.5;
|
|
5
|
+
function isPointAtRect(overlayContext, p, rect) {
|
|
6
|
+
const ctx = overlayContext;
|
|
14
7
|
const { x, y, w, h } = rect;
|
|
15
8
|
ctx.beginPath();
|
|
16
9
|
ctx.rect(x, y, w, h);
|
|
@@ -20,13 +13,13 @@ function isPointAtRect(helperContext, p, rect) {
|
|
|
20
13
|
}
|
|
21
14
|
return false;
|
|
22
15
|
}
|
|
23
|
-
export function isPointInScrollThumb(
|
|
16
|
+
export function isPointInScrollThumb(overlayContext, p, opts) {
|
|
24
17
|
let thumbType = null;
|
|
25
18
|
const { xThumbRect, yThumbRect } = opts;
|
|
26
|
-
if (xThumbRect && isPointAtRect(
|
|
19
|
+
if (xThumbRect && isPointAtRect(overlayContext, p, xThumbRect)) {
|
|
27
20
|
thumbType = 'X';
|
|
28
21
|
}
|
|
29
|
-
else if (yThumbRect && isPointAtRect(
|
|
22
|
+
else if (yThumbRect && isPointAtRect(overlayContext, p, yThumbRect)) {
|
|
30
23
|
thumbType = 'Y';
|
|
31
24
|
}
|
|
32
25
|
return thumbType;
|
|
@@ -38,15 +31,19 @@ function getScrollInfoFromSnapshot(snapshot) {
|
|
|
38
31
|
prevPoint: sharedStore[keyPrevPoint] || null,
|
|
39
32
|
activeThumbType: sharedStore[keyActiveThumbType] || null,
|
|
40
33
|
xThumbRect: sharedStore[keyXThumbRect] || null,
|
|
41
|
-
yThumbRect: sharedStore[keyYThumbRect] || null
|
|
34
|
+
yThumbRect: sharedStore[keyYThumbRect] || null,
|
|
35
|
+
hoverXThumb: sharedStore[keyHoverXThumbRect],
|
|
36
|
+
hoverYThumb: sharedStore[keyHoverYThumbRect]
|
|
42
37
|
};
|
|
43
38
|
return info;
|
|
44
39
|
}
|
|
45
|
-
function calcScrollerInfo(
|
|
40
|
+
function calcScrollerInfo(opts) {
|
|
41
|
+
const { viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb, style } = opts;
|
|
46
42
|
const { width, height } = viewSizeInfo;
|
|
47
43
|
const { offsetTop, offsetBottom, offsetLeft, offsetRight } = viewScaleInfo;
|
|
48
|
-
const sliderMinSize =
|
|
44
|
+
const sliderMinSize = minThumbLength;
|
|
49
45
|
const lineSize = scrollerLineWidth;
|
|
46
|
+
const { thumbBackground, thumbBorderColor, hoverThumbBackground, hoverThumbBorderColor } = style;
|
|
50
47
|
let xSize = 0;
|
|
51
48
|
let ySize = 0;
|
|
52
49
|
xSize = Math.max(sliderMinSize, width - lineSize * 2 - (Math.abs(offsetLeft) + Math.abs(offsetRight)));
|
|
@@ -101,8 +98,10 @@ function calcScrollerInfo(viewScaleInfo, viewSizeInfo) {
|
|
|
101
98
|
ySize,
|
|
102
99
|
translateY,
|
|
103
100
|
translateX,
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
xThumbBackground: hoverXThumb ? hoverThumbBackground : thumbBackground,
|
|
102
|
+
yThumbBackground: hoverYThumb ? hoverThumbBackground : thumbBackground,
|
|
103
|
+
xThumbBorderColor: hoverXThumb ? hoverThumbBorderColor : thumbBorderColor,
|
|
104
|
+
yThumbBorderColor: hoverYThumb ? hoverThumbBorderColor : thumbBorderColor,
|
|
106
105
|
xThumbRect,
|
|
107
106
|
yThumbRect
|
|
108
107
|
};
|
|
@@ -110,13 +109,14 @@ function calcScrollerInfo(viewScaleInfo, viewSizeInfo) {
|
|
|
110
109
|
}
|
|
111
110
|
function drawScrollerThumb(ctx, opts) {
|
|
112
111
|
let { x, y, h, w } = opts;
|
|
112
|
+
const { background, borderColor } = opts;
|
|
113
113
|
ctx.save();
|
|
114
114
|
ctx.shadowColor = '#FFFFFF';
|
|
115
115
|
ctx.shadowOffsetX = 0;
|
|
116
116
|
ctx.shadowOffsetY = 0;
|
|
117
117
|
ctx.shadowBlur = 1;
|
|
118
118
|
{
|
|
119
|
-
const {
|
|
119
|
+
const { axis } = opts;
|
|
120
120
|
if (axis === 'X') {
|
|
121
121
|
y = y + h / 4 + 0;
|
|
122
122
|
h = h / 2;
|
|
@@ -130,7 +130,7 @@ function drawScrollerThumb(ctx, opts) {
|
|
|
130
130
|
if (w < r * 2 || h < r * 2) {
|
|
131
131
|
r = 0;
|
|
132
132
|
}
|
|
133
|
-
ctx.globalAlpha =
|
|
133
|
+
ctx.globalAlpha = 1;
|
|
134
134
|
ctx.beginPath();
|
|
135
135
|
ctx.moveTo(x + r, y);
|
|
136
136
|
ctx.arcTo(x + w, y, x + w, y + h, r);
|
|
@@ -138,12 +138,11 @@ function drawScrollerThumb(ctx, opts) {
|
|
|
138
138
|
ctx.arcTo(x, y + h, x, y, r);
|
|
139
139
|
ctx.arcTo(x, y, x + w, y, r);
|
|
140
140
|
ctx.closePath();
|
|
141
|
-
ctx.fillStyle =
|
|
141
|
+
ctx.fillStyle = background;
|
|
142
142
|
ctx.fill();
|
|
143
|
-
ctx.globalAlpha = 1;
|
|
144
143
|
ctx.beginPath();
|
|
145
144
|
ctx.lineWidth = 1;
|
|
146
|
-
ctx.strokeStyle =
|
|
145
|
+
ctx.strokeStyle = borderColor;
|
|
147
146
|
ctx.setLineDash([]);
|
|
148
147
|
ctx.moveTo(x + r, y);
|
|
149
148
|
ctx.arcTo(x + w, y, x + w, y + h, r);
|
|
@@ -155,12 +154,11 @@ function drawScrollerThumb(ctx, opts) {
|
|
|
155
154
|
}
|
|
156
155
|
ctx.restore();
|
|
157
156
|
}
|
|
158
|
-
function drawScrollerInfo(
|
|
159
|
-
const ctx =
|
|
160
|
-
const { viewScaleInfo, viewSizeInfo, scrollInfo } = opts;
|
|
161
|
-
const { activeThumbType, prevPoint, activePoint } = scrollInfo;
|
|
162
|
-
const {
|
|
163
|
-
const wrapper = calcScrollerInfo(viewScaleInfo, viewSizeInfo);
|
|
157
|
+
function drawScrollerInfo(overlayContext, opts) {
|
|
158
|
+
const ctx = overlayContext;
|
|
159
|
+
const { viewScaleInfo, viewSizeInfo, scrollInfo, style } = opts;
|
|
160
|
+
const { activeThumbType, prevPoint, activePoint, hoverXThumb, hoverYThumb } = scrollInfo;
|
|
161
|
+
const wrapper = calcScrollerInfo({ viewScaleInfo, viewSizeInfo, hoverXThumb, hoverYThumb, style });
|
|
164
162
|
let xThumbRect = Object.assign({}, wrapper.xThumbRect);
|
|
165
163
|
let yThumbRect = Object.assign({}, wrapper.yThumbRect);
|
|
166
164
|
if (activeThumbType && prevPoint && activePoint) {
|
|
@@ -173,27 +171,18 @@ function drawScrollerInfo(helperContext, opts) {
|
|
|
173
171
|
yThumbRect.y = yThumbRect.y + (activePoint.y - prevPoint.y);
|
|
174
172
|
}
|
|
175
173
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
ctx.fillRect(0, height - wrapper.lineSize, width, wrapper.lineSize);
|
|
179
|
-
}
|
|
180
|
-
drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: 'X' }, xThumbRect), { r: wrapper.lineSize / 2, color: wrapper.thumbColor }));
|
|
181
|
-
if (scrollConfig.showScrollBar === true) {
|
|
182
|
-
ctx.fillStyle = wrapper.scrollBarColor;
|
|
183
|
-
ctx.fillRect(width - wrapper.lineSize, 0, wrapper.lineSize, height);
|
|
184
|
-
}
|
|
185
|
-
drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: 'Y' }, yThumbRect), { r: wrapper.lineSize / 2, color: wrapper.thumbColor }));
|
|
186
|
-
ctx.globalAlpha = 1;
|
|
174
|
+
drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: 'X' }, xThumbRect), { r: wrapper.lineSize / 2, background: wrapper.xThumbBackground, borderColor: wrapper.xThumbBorderColor }));
|
|
175
|
+
drawScrollerThumb(ctx, Object.assign(Object.assign({ axis: 'Y' }, yThumbRect), { r: wrapper.lineSize / 2, background: wrapper.yThumbBackground, borderColor: wrapper.yThumbBorderColor }));
|
|
187
176
|
return {
|
|
188
177
|
xThumbRect,
|
|
189
178
|
yThumbRect
|
|
190
179
|
};
|
|
191
180
|
}
|
|
192
181
|
export function drawScroller(ctx, opts) {
|
|
193
|
-
const { snapshot } = opts;
|
|
182
|
+
const { snapshot, style } = opts;
|
|
194
183
|
const viewSizeInfo = getViewSizeInfoFromSnapshot(snapshot);
|
|
195
184
|
const viewScaleInfo = getViewScaleInfoFromSnapshot(snapshot);
|
|
196
185
|
const scrollInfo = getScrollInfoFromSnapshot(snapshot);
|
|
197
|
-
const { xThumbRect, yThumbRect } = drawScrollerInfo(ctx, { viewSizeInfo, viewScaleInfo, scrollInfo });
|
|
186
|
+
const { xThumbRect, yThumbRect } = drawScrollerInfo(ctx, { viewSizeInfo, viewScaleInfo, scrollInfo, style });
|
|
198
187
|
return { xThumbRect, yThumbRect };
|
|
199
188
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MiddlewareSelectorStyle } from '@idraw/types';
|
|
1
2
|
export declare const key = "SELECT";
|
|
2
3
|
export declare const keyActionType: unique symbol;
|
|
3
4
|
export declare const keyResizeType: unique symbol;
|
|
@@ -8,8 +9,12 @@ export declare const keyHoverElementVertexes: unique symbol;
|
|
|
8
9
|
export declare const keySelectedElementList: unique symbol;
|
|
9
10
|
export declare const keySelectedElementListVertexes: unique symbol;
|
|
10
11
|
export declare const keySelectedElementController: unique symbol;
|
|
12
|
+
export declare const keySelectedElementPosition: unique symbol;
|
|
11
13
|
export declare const keyGroupQueue: unique symbol;
|
|
12
14
|
export declare const keyGroupQueueVertexesList: unique symbol;
|
|
15
|
+
export declare const keyIsMoving: unique symbol;
|
|
16
|
+
export declare const keyEnableSelectInGroup: unique symbol;
|
|
17
|
+
export declare const keyEnableSnapToGrid: unique symbol;
|
|
13
18
|
export declare const keyDebugElemCenter: unique symbol;
|
|
14
19
|
export declare const keyDebugStartVertical: unique symbol;
|
|
15
20
|
export declare const keyDebugEndVertical: unique symbol;
|
|
@@ -19,4 +24,7 @@ export declare const keyDebugEnd0: unique symbol;
|
|
|
19
24
|
export declare const selectWrapperBorderWidth = 2;
|
|
20
25
|
export declare const resizeControllerBorderWidth = 4;
|
|
21
26
|
export declare const areaBorderWidth = 1;
|
|
22
|
-
export declare const
|
|
27
|
+
export declare const controllerSize = 10;
|
|
28
|
+
export declare const rotateControllerSize = 20;
|
|
29
|
+
export declare const rotateControllerPosition = 22;
|
|
30
|
+
export declare const defaultStyle: MiddlewareSelectorStyle;
|
|
@@ -8,8 +8,12 @@ export const keyHoverElementVertexes = Symbol(`${key}_hoverElementVertexes`);
|
|
|
8
8
|
export const keySelectedElementList = Symbol(`${key}_selectedElementList`);
|
|
9
9
|
export const keySelectedElementListVertexes = Symbol(`${key}_selectedElementListVertexes`);
|
|
10
10
|
export const keySelectedElementController = Symbol(`${key}_selectedElementController`);
|
|
11
|
+
export const keySelectedElementPosition = Symbol(`${key}_selectedElementPosition`);
|
|
11
12
|
export const keyGroupQueue = Symbol(`${key}_groupQueue`);
|
|
12
13
|
export const keyGroupQueueVertexesList = Symbol(`${key}_groupQueueVertexesList`);
|
|
14
|
+
export const keyIsMoving = Symbol(`${key}_isMoving`);
|
|
15
|
+
export const keyEnableSelectInGroup = Symbol(`${key}_enableSelectInGroup`);
|
|
16
|
+
export const keyEnableSnapToGrid = Symbol(`${key}_enableSnapToGrid`);
|
|
13
17
|
export const keyDebugElemCenter = Symbol(`${key}_debug_elemCenter`);
|
|
14
18
|
export const keyDebugStartVertical = Symbol(`${key}_debug_startVertical`);
|
|
15
19
|
export const keyDebugEndVertical = Symbol(`${key}_debug_endVertical`);
|
|
@@ -19,4 +23,16 @@ export const keyDebugEnd0 = Symbol(`${key}_debug_end0`);
|
|
|
19
23
|
export const selectWrapperBorderWidth = 2;
|
|
20
24
|
export const resizeControllerBorderWidth = 4;
|
|
21
25
|
export const areaBorderWidth = 1;
|
|
22
|
-
export const
|
|
26
|
+
export const controllerSize = 10;
|
|
27
|
+
export const rotateControllerSize = 20;
|
|
28
|
+
export const rotateControllerPosition = 22;
|
|
29
|
+
const activeColor = '#1973ba';
|
|
30
|
+
const activeAreaColor = '#1976d21c';
|
|
31
|
+
const lockedColor = '#5b5959b5';
|
|
32
|
+
const referenceColor = '#f7276e';
|
|
33
|
+
export const defaultStyle = {
|
|
34
|
+
activeColor,
|
|
35
|
+
activeAreaColor,
|
|
36
|
+
lockedColor,
|
|
37
|
+
referenceColor
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function getViewBoxInfo(rectInfo) {
|
|
2
|
+
const boxInfo = {
|
|
3
|
+
minX: rectInfo.topLeft.x,
|
|
4
|
+
minY: rectInfo.topLeft.y,
|
|
5
|
+
maxX: rectInfo.bottomRight.x,
|
|
6
|
+
maxY: rectInfo.bottomRight.y,
|
|
7
|
+
midX: rectInfo.center.x,
|
|
8
|
+
midY: rectInfo.center.y
|
|
9
|
+
};
|
|
10
|
+
return boxInfo;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PointSize, ViewContext2D, ViewRectVertexes } from '@idraw/types';
|
|
2
|
+
export declare function drawVertexes(ctx: ViewContext2D, vertexes: ViewRectVertexes, opts: {
|
|
3
|
+
borderColor: string;
|
|
4
|
+
borderWidth: number;
|
|
5
|
+
background: string;
|
|
6
|
+
lineDash: number[];
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function drawLine(ctx: ViewContext2D, start: PointSize, end: PointSize, opts: {
|
|
9
|
+
borderColor: string;
|
|
10
|
+
borderWidth: number;
|
|
11
|
+
lineDash: number[];
|
|
12
|
+
}): void;
|
|
13
|
+
export declare function drawCircleController(ctx: ViewContext2D, circleCenter: PointSize, opts: {
|
|
14
|
+
borderColor: string;
|
|
15
|
+
borderWidth: number;
|
|
16
|
+
background: string;
|
|
17
|
+
lineDash: number[];
|
|
18
|
+
size: number;
|
|
19
|
+
}): void;
|
|
20
|
+
export declare function drawCrossVertexes(ctx: ViewContext2D, vertexes: ViewRectVertexes, opts: {
|
|
21
|
+
borderColor: string;
|
|
22
|
+
borderWidth: number;
|
|
23
|
+
lineDash: number[];
|
|
24
|
+
}): void;
|
|
25
|
+
export declare function drawCrossByCenter(ctx: ViewContext2D, center: PointSize, opts: {
|
|
26
|
+
size: number;
|
|
27
|
+
borderColor: string;
|
|
28
|
+
borderWidth: number;
|
|
29
|
+
lineDash: number[];
|
|
30
|
+
}): void;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export function drawVertexes(ctx, vertexes, opts) {
|
|
2
|
+
const { borderColor, borderWidth, background, lineDash } = opts;
|
|
3
|
+
ctx.setLineDash([]);
|
|
4
|
+
ctx.lineWidth = borderWidth;
|
|
5
|
+
ctx.strokeStyle = borderColor;
|
|
6
|
+
ctx.fillStyle = background;
|
|
7
|
+
ctx.setLineDash(lineDash);
|
|
8
|
+
ctx.beginPath();
|
|
9
|
+
ctx.moveTo(vertexes[0].x, vertexes[0].y);
|
|
10
|
+
ctx.lineTo(vertexes[1].x, vertexes[1].y);
|
|
11
|
+
ctx.lineTo(vertexes[2].x, vertexes[2].y);
|
|
12
|
+
ctx.lineTo(vertexes[3].x, vertexes[3].y);
|
|
13
|
+
ctx.lineTo(vertexes[0].x, vertexes[0].y);
|
|
14
|
+
ctx.closePath();
|
|
15
|
+
ctx.stroke();
|
|
16
|
+
ctx.fill();
|
|
17
|
+
}
|
|
18
|
+
export function drawLine(ctx, start, end, opts) {
|
|
19
|
+
const { borderColor, borderWidth, lineDash } = opts;
|
|
20
|
+
ctx.setLineDash([]);
|
|
21
|
+
ctx.lineWidth = borderWidth;
|
|
22
|
+
ctx.strokeStyle = borderColor;
|
|
23
|
+
ctx.setLineDash(lineDash);
|
|
24
|
+
ctx.beginPath();
|
|
25
|
+
ctx.moveTo(start.x, start.y);
|
|
26
|
+
ctx.lineTo(end.x, end.y);
|
|
27
|
+
ctx.closePath();
|
|
28
|
+
ctx.stroke();
|
|
29
|
+
}
|
|
30
|
+
export function drawCircleController(ctx, circleCenter, opts) {
|
|
31
|
+
const { size, borderColor, borderWidth, background } = opts;
|
|
32
|
+
const center = circleCenter;
|
|
33
|
+
const r = size / 2;
|
|
34
|
+
const a = r;
|
|
35
|
+
const b = r;
|
|
36
|
+
if (a >= 0 && b >= 0) {
|
|
37
|
+
if (typeof borderWidth === 'number' && borderWidth > 0) {
|
|
38
|
+
const ba = borderWidth / 2 + a;
|
|
39
|
+
const bb = borderWidth / 2 + b;
|
|
40
|
+
ctx.beginPath();
|
|
41
|
+
ctx.strokeStyle = borderColor;
|
|
42
|
+
ctx.lineWidth = borderWidth;
|
|
43
|
+
ctx.circle(center.x, center.y, ba, bb, 0, 0, 2 * Math.PI);
|
|
44
|
+
ctx.closePath();
|
|
45
|
+
ctx.stroke();
|
|
46
|
+
}
|
|
47
|
+
ctx.beginPath();
|
|
48
|
+
ctx.fillStyle = background;
|
|
49
|
+
ctx.circle(center.x, center.y, a, b, 0, 0, 2 * Math.PI);
|
|
50
|
+
ctx.closePath();
|
|
51
|
+
ctx.fill();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export function drawCrossVertexes(ctx, vertexes, opts) {
|
|
55
|
+
const { borderColor, borderWidth, lineDash } = opts;
|
|
56
|
+
ctx.setLineDash([]);
|
|
57
|
+
ctx.lineWidth = borderWidth;
|
|
58
|
+
ctx.strokeStyle = borderColor;
|
|
59
|
+
ctx.setLineDash(lineDash);
|
|
60
|
+
ctx.beginPath();
|
|
61
|
+
ctx.moveTo(vertexes[0].x, vertexes[0].y);
|
|
62
|
+
ctx.lineTo(vertexes[2].x, vertexes[2].y);
|
|
63
|
+
ctx.closePath();
|
|
64
|
+
ctx.stroke();
|
|
65
|
+
ctx.beginPath();
|
|
66
|
+
ctx.moveTo(vertexes[1].x, vertexes[1].y);
|
|
67
|
+
ctx.lineTo(vertexes[3].x, vertexes[3].y);
|
|
68
|
+
ctx.closePath();
|
|
69
|
+
ctx.stroke();
|
|
70
|
+
}
|
|
71
|
+
export function drawCrossByCenter(ctx, center, opts) {
|
|
72
|
+
const { size, borderColor, borderWidth, lineDash } = opts;
|
|
73
|
+
const minX = center.x - size / 2;
|
|
74
|
+
const maxX = center.x + size / 2;
|
|
75
|
+
const minY = center.y - size / 2;
|
|
76
|
+
const maxY = center.y + size / 2;
|
|
77
|
+
const vertexes = [
|
|
78
|
+
{
|
|
79
|
+
x: minX,
|
|
80
|
+
y: minY
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
x: maxX,
|
|
84
|
+
y: minY
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
x: maxX,
|
|
88
|
+
y: maxY
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
x: minX,
|
|
92
|
+
y: maxY
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
drawCrossVertexes(ctx, vertexes, {
|
|
96
|
+
borderColor,
|
|
97
|
+
borderWidth,
|
|
98
|
+
lineDash
|
|
99
|
+
});
|
|
100
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ElementSizeController, ViewContext2D, ViewSizeInfo, ViewScaleInfo } from '@idraw/types';
|
|
2
|
+
export declare function drawDebugStoreSelectedElementController(ctx: ViewContext2D, controller: ElementSizeController | null, opts: {
|
|
3
|
+
viewSizeInfo: ViewSizeInfo;
|
|
4
|
+
viewScaleInfo: ViewScaleInfo;
|
|
5
|
+
}): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { calcViewPointSize } from '@idraw/util';
|
|
2
|
+
function drawDebugControllerVertexes(opts) {
|
|
3
|
+
const { ctx, viewScaleInfo, vertexes } = opts;
|
|
4
|
+
const v0 = calcViewPointSize(vertexes[0], { viewScaleInfo });
|
|
5
|
+
const v1 = calcViewPointSize(vertexes[1], { viewScaleInfo });
|
|
6
|
+
const v2 = calcViewPointSize(vertexes[2], { viewScaleInfo });
|
|
7
|
+
const v3 = calcViewPointSize(vertexes[3], { viewScaleInfo });
|
|
8
|
+
ctx.beginPath();
|
|
9
|
+
ctx.fillStyle = '#FF0000A1';
|
|
10
|
+
ctx.moveTo(v0.x, v0.y);
|
|
11
|
+
ctx.lineTo(v1.x, v1.y);
|
|
12
|
+
ctx.lineTo(v2.x, v2.y);
|
|
13
|
+
ctx.lineTo(v3.x, v3.y);
|
|
14
|
+
ctx.lineTo(v0.x, v0.y);
|
|
15
|
+
ctx.closePath();
|
|
16
|
+
ctx.fill();
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
export function drawDebugStoreSelectedElementController(ctx, controller, opts) {
|
|
20
|
+
if (!controller) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const { viewSizeInfo, viewScaleInfo } = opts;
|
|
24
|
+
const { left, right, top, bottom, topLeft, topRight, bottomLeft, bottomRight, rotate } = controller;
|
|
25
|
+
const ctrls = [left, right, top, bottom, topLeft, topRight, bottomLeft, bottomRight, rotate];
|
|
26
|
+
for (let i = 0; i < ctrls.length; i++) {
|
|
27
|
+
const ctrl = ctrls[i];
|
|
28
|
+
drawDebugControllerVertexes({ ctx, vertexes: ctrl.vertexes, viewSizeInfo, viewScaleInfo });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ViewContext2D, PointSize } from '@idraw/types';
|
|
2
|
+
import { MiddlewareSelectorStyle } from './types';
|
|
3
|
+
export declare function drawReferenceLines(ctx: ViewContext2D, opts: {
|
|
4
|
+
xLines?: Array<PointSize[]>;
|
|
5
|
+
yLines?: Array<PointSize[]>;
|
|
6
|
+
style: MiddlewareSelectorStyle;
|
|
7
|
+
}): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { drawLine, drawCrossByCenter } from './draw-base';
|
|
2
|
+
export function drawReferenceLines(ctx, opts) {
|
|
3
|
+
const { xLines, yLines, style } = opts;
|
|
4
|
+
const { referenceColor } = style;
|
|
5
|
+
const lineOpts = {
|
|
6
|
+
borderColor: referenceColor,
|
|
7
|
+
borderWidth: 1,
|
|
8
|
+
lineDash: []
|
|
9
|
+
};
|
|
10
|
+
const crossOpts = Object.assign(Object.assign({}, lineOpts), { size: 6 });
|
|
11
|
+
if (xLines) {
|
|
12
|
+
xLines.forEach((line) => {
|
|
13
|
+
line.forEach((p, pIdx) => {
|
|
14
|
+
drawCrossByCenter(ctx, p, crossOpts);
|
|
15
|
+
if (line[pIdx + 1]) {
|
|
16
|
+
drawLine(ctx, line[pIdx], line[pIdx + 1], lineOpts);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (yLines) {
|
|
22
|
+
yLines.forEach((line) => {
|
|
23
|
+
line.forEach((p, pIdx) => {
|
|
24
|
+
drawCrossByCenter(ctx, p, crossOpts);
|
|
25
|
+
if (line[pIdx + 1]) {
|
|
26
|
+
drawLine(ctx, line[pIdx], line[pIdx + 1], lineOpts);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,22 +1,37 @@
|
|
|
1
|
-
import type { Element, ElementType, PointSize, RendererDrawElementOptions, ViewContext2D, ViewRectVertexes, ViewScaleInfo, ViewSizeInfo, ElementSizeController } from '@idraw/types';
|
|
1
|
+
import type { Element, ElementType, PointSize, RendererDrawElementOptions, ViewContext2D, ViewRectVertexes, ViewScaleInfo, ViewSizeInfo, ElementSizeController, ViewCalculator, MiddlewareSelectorStyle } from '@idraw/types';
|
|
2
2
|
import type { AreaSize } from './types';
|
|
3
3
|
export declare function drawHoverVertexesWrapper(ctx: ViewContext2D, vertexes: ViewRectVertexes | null, opts: {
|
|
4
4
|
viewScaleInfo: ViewScaleInfo;
|
|
5
5
|
viewSizeInfo: ViewSizeInfo;
|
|
6
|
+
style: MiddlewareSelectorStyle;
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function drawLockedVertexesWrapper(ctx: ViewContext2D, vertexes: ViewRectVertexes | null, opts: {
|
|
9
|
+
viewScaleInfo: ViewScaleInfo;
|
|
10
|
+
viewSizeInfo: ViewSizeInfo;
|
|
11
|
+
controller?: ElementSizeController | null;
|
|
12
|
+
style: MiddlewareSelectorStyle;
|
|
6
13
|
}): void;
|
|
7
14
|
export declare function drawSelectedElementControllersVertexes(ctx: ViewContext2D, controller: ElementSizeController | null, opts: {
|
|
15
|
+
hideControllers: boolean;
|
|
8
16
|
viewScaleInfo: ViewScaleInfo;
|
|
9
17
|
viewSizeInfo: ViewSizeInfo;
|
|
18
|
+
element: Element | null;
|
|
19
|
+
calculator: ViewCalculator;
|
|
20
|
+
style: MiddlewareSelectorStyle;
|
|
21
|
+
rotateControllerPattern: ViewContext2D;
|
|
10
22
|
}): void;
|
|
11
23
|
export declare function drawElementListShadows(ctx: ViewContext2D, elements: Element<ElementType>[], opts?: Omit<RendererDrawElementOptions, 'loader'>): void;
|
|
12
24
|
export declare function drawArea(ctx: ViewContext2D, opts: {
|
|
13
25
|
start: PointSize;
|
|
14
26
|
end: PointSize;
|
|
27
|
+
style: MiddlewareSelectorStyle;
|
|
15
28
|
}): void;
|
|
16
29
|
export declare function drawListArea(ctx: ViewContext2D, opts: {
|
|
17
30
|
areaSize: AreaSize;
|
|
31
|
+
style: MiddlewareSelectorStyle;
|
|
18
32
|
}): void;
|
|
19
33
|
export declare function drawGroupQueueVertexesWrappers(ctx: ViewContext2D, vertexesList: ViewRectVertexes[], opts: {
|
|
20
34
|
viewScaleInfo: ViewScaleInfo;
|
|
21
35
|
viewSizeInfo: ViewSizeInfo;
|
|
36
|
+
style: MiddlewareSelectorStyle;
|
|
22
37
|
}): void;
|
|
@@ -1,49 +1,67 @@
|
|
|
1
|
-
import { rotateElementVertexes, calcViewVertexes } from '@idraw/util';
|
|
2
|
-
import { resizeControllerBorderWidth, areaBorderWidth,
|
|
3
|
-
|
|
4
|
-
const { borderColor, borderWidth, background, lineDash } = opts;
|
|
5
|
-
ctx.setLineDash([]);
|
|
6
|
-
ctx.lineWidth = borderWidth;
|
|
7
|
-
ctx.strokeStyle = borderColor;
|
|
8
|
-
ctx.fillStyle = background;
|
|
9
|
-
ctx.setLineDash(lineDash);
|
|
10
|
-
ctx.beginPath();
|
|
11
|
-
ctx.moveTo(vertexes[0].x, vertexes[0].y);
|
|
12
|
-
ctx.lineTo(vertexes[1].x, vertexes[1].y);
|
|
13
|
-
ctx.lineTo(vertexes[2].x, vertexes[2].y);
|
|
14
|
-
ctx.lineTo(vertexes[3].x, vertexes[3].y);
|
|
15
|
-
ctx.lineTo(vertexes[0].x, vertexes[0].y);
|
|
16
|
-
ctx.closePath();
|
|
17
|
-
ctx.stroke();
|
|
18
|
-
ctx.fill();
|
|
19
|
-
}
|
|
1
|
+
import { rotateElementVertexes, calcViewPointSize, calcViewVertexes, calcViewElementSize } from '@idraw/util';
|
|
2
|
+
import { resizeControllerBorderWidth, areaBorderWidth, selectWrapperBorderWidth } from './config';
|
|
3
|
+
import { drawVertexes, drawCircleController, drawCrossVertexes } from './draw-base';
|
|
20
4
|
export function drawHoverVertexesWrapper(ctx, vertexes, opts) {
|
|
21
5
|
if (!vertexes) {
|
|
22
6
|
return;
|
|
23
7
|
}
|
|
24
|
-
const
|
|
8
|
+
const { style } = opts;
|
|
9
|
+
const { activeColor } = style;
|
|
10
|
+
const wrapperOpts = { borderColor: activeColor, borderWidth: 1, background: 'transparent', lineDash: [] };
|
|
11
|
+
drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts);
|
|
12
|
+
}
|
|
13
|
+
export function drawLockedVertexesWrapper(ctx, vertexes, opts) {
|
|
14
|
+
if (!vertexes) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const { style } = opts;
|
|
18
|
+
const { lockedColor } = style;
|
|
19
|
+
const wrapperOpts = { borderColor: lockedColor, borderWidth: 1, background: 'transparent', lineDash: [] };
|
|
25
20
|
drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts);
|
|
21
|
+
const { controller } = opts;
|
|
22
|
+
if (controller) {
|
|
23
|
+
const { topLeft, topRight, bottomLeft, bottomRight, topMiddle, bottomMiddle, leftMiddle, rightMiddle } = controller;
|
|
24
|
+
const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: 1, background: lockedColor });
|
|
25
|
+
drawCrossVertexes(ctx, calcViewVertexes(topMiddle.vertexes, opts), ctrlOpts);
|
|
26
|
+
drawCrossVertexes(ctx, calcViewVertexes(bottomMiddle.vertexes, opts), ctrlOpts);
|
|
27
|
+
drawCrossVertexes(ctx, calcViewVertexes(leftMiddle.vertexes, opts), ctrlOpts);
|
|
28
|
+
drawCrossVertexes(ctx, calcViewVertexes(rightMiddle.vertexes, opts), ctrlOpts);
|
|
29
|
+
drawCrossVertexes(ctx, calcViewVertexes(topLeft.vertexes, opts), ctrlOpts);
|
|
30
|
+
drawCrossVertexes(ctx, calcViewVertexes(topRight.vertexes, opts), ctrlOpts);
|
|
31
|
+
drawCrossVertexes(ctx, calcViewVertexes(bottomLeft.vertexes, opts), ctrlOpts);
|
|
32
|
+
drawCrossVertexes(ctx, calcViewVertexes(bottomRight.vertexes, opts), ctrlOpts);
|
|
33
|
+
}
|
|
26
34
|
}
|
|
27
35
|
export function drawSelectedElementControllersVertexes(ctx, controller, opts) {
|
|
36
|
+
var _a;
|
|
28
37
|
if (!controller) {
|
|
29
38
|
return;
|
|
30
39
|
}
|
|
31
|
-
const {
|
|
32
|
-
const
|
|
40
|
+
const { hideControllers, style, rotateControllerPattern, viewSizeInfo, element } = opts;
|
|
41
|
+
const { devicePixelRatio = 1 } = viewSizeInfo;
|
|
42
|
+
const { activeColor } = style;
|
|
43
|
+
const { elementWrapper, topLeft, topRight, bottomLeft, bottomRight, rotate } = controller;
|
|
44
|
+
const wrapperOpts = { borderColor: activeColor, borderWidth: selectWrapperBorderWidth, background: 'transparent', lineDash: [] };
|
|
33
45
|
const ctrlOpts = Object.assign(Object.assign({}, wrapperOpts), { borderWidth: resizeControllerBorderWidth, background: '#FFFFFF' });
|
|
34
46
|
drawVertexes(ctx, calcViewVertexes(elementWrapper, opts), wrapperOpts);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
if (!hideControllers) {
|
|
48
|
+
drawVertexes(ctx, calcViewVertexes(topLeft.vertexes, opts), ctrlOpts);
|
|
49
|
+
drawVertexes(ctx, calcViewVertexes(topRight.vertexes, opts), ctrlOpts);
|
|
50
|
+
drawVertexes(ctx, calcViewVertexes(bottomLeft.vertexes, opts), ctrlOpts);
|
|
51
|
+
drawVertexes(ctx, calcViewVertexes(bottomRight.vertexes, opts), ctrlOpts);
|
|
52
|
+
if (((_a = element === null || element === void 0 ? void 0 : element.operations) === null || _a === void 0 ? void 0 : _a.rotatable) !== false) {
|
|
53
|
+
drawCircleController(ctx, calcViewPointSize(rotate.center, opts), Object.assign(Object.assign({}, ctrlOpts), { size: rotate.size, borderWidth: 0 }));
|
|
54
|
+
const rotateCenter = calcViewPointSize(rotate.center, opts);
|
|
55
|
+
ctx.drawImage(rotateControllerPattern.canvas, 0, 0, rotateControllerPattern.canvas.width / devicePixelRatio, rotateControllerPattern.canvas.height / devicePixelRatio, rotateCenter.x - rotate.size / 2, rotateCenter.y - rotate.size / 2, rotate.size, rotate.size);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
39
58
|
}
|
|
40
59
|
export function drawElementListShadows(ctx, elements, opts) {
|
|
41
60
|
elements.forEach((elem) => {
|
|
42
61
|
let { x, y, w, h } = elem;
|
|
43
62
|
const { angle = 0 } = elem;
|
|
44
63
|
if (opts === null || opts === void 0 ? void 0 : opts.calculator) {
|
|
45
|
-
const {
|
|
46
|
-
const size = calculator.elementSize({ x, y, w, h }, opts.viewScaleInfo, opts.viewSizeInfo);
|
|
64
|
+
const size = calcViewElementSize({ x, y, w, h }, opts);
|
|
47
65
|
x = size.x;
|
|
48
66
|
y = size.y;
|
|
49
67
|
w = size.w;
|
|
@@ -68,11 +86,12 @@ export function drawElementListShadows(ctx, elements, opts) {
|
|
|
68
86
|
});
|
|
69
87
|
}
|
|
70
88
|
export function drawArea(ctx, opts) {
|
|
71
|
-
const { start, end } = opts;
|
|
89
|
+
const { start, end, style } = opts;
|
|
90
|
+
const { activeColor, activeAreaColor } = style;
|
|
72
91
|
ctx.setLineDash([]);
|
|
73
92
|
ctx.lineWidth = areaBorderWidth;
|
|
74
|
-
ctx.strokeStyle =
|
|
75
|
-
ctx.fillStyle =
|
|
93
|
+
ctx.strokeStyle = activeColor;
|
|
94
|
+
ctx.fillStyle = activeAreaColor;
|
|
76
95
|
ctx.beginPath();
|
|
77
96
|
ctx.moveTo(start.x, start.y);
|
|
78
97
|
ctx.lineTo(end.x, start.y);
|
|
@@ -83,12 +102,13 @@ export function drawArea(ctx, opts) {
|
|
|
83
102
|
ctx.fill();
|
|
84
103
|
}
|
|
85
104
|
export function drawListArea(ctx, opts) {
|
|
86
|
-
const { areaSize } = opts;
|
|
105
|
+
const { areaSize, style } = opts;
|
|
106
|
+
const { activeColor, activeAreaColor } = style;
|
|
87
107
|
const { x, y, w, h } = areaSize;
|
|
88
108
|
ctx.setLineDash([]);
|
|
89
109
|
ctx.lineWidth = areaBorderWidth;
|
|
90
|
-
ctx.strokeStyle =
|
|
91
|
-
ctx.fillStyle =
|
|
110
|
+
ctx.strokeStyle = activeColor;
|
|
111
|
+
ctx.fillStyle = activeAreaColor;
|
|
92
112
|
ctx.beginPath();
|
|
93
113
|
ctx.moveTo(x, y);
|
|
94
114
|
ctx.lineTo(x + w, y);
|
|
@@ -99,9 +119,11 @@ export function drawListArea(ctx, opts) {
|
|
|
99
119
|
ctx.fill();
|
|
100
120
|
}
|
|
101
121
|
export function drawGroupQueueVertexesWrappers(ctx, vertexesList, opts) {
|
|
122
|
+
const { style } = opts;
|
|
123
|
+
const { activeColor } = style;
|
|
102
124
|
for (let i = 0; i < vertexesList.length; i++) {
|
|
103
125
|
const vertexes = vertexesList[i];
|
|
104
|
-
const wrapperOpts = { borderColor:
|
|
126
|
+
const wrapperOpts = { borderColor: activeColor, borderWidth: selectWrapperBorderWidth, background: 'transparent', lineDash: [4, 4] };
|
|
105
127
|
drawVertexes(ctx, calcViewVertexes(vertexes, opts), wrapperOpts);
|
|
106
128
|
}
|
|
107
129
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BoardMiddleware, DeepSelectorSharedStorage } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { CoreEventMap, MiddlewareSelectorConfig } from '@idraw/types';
|
|
2
|
+
import type { BoardMiddleware, ActionType, DeepSelectorSharedStorage } from './types';
|
|
3
|
+
import { keyActionType, keyResizeType, keyGroupQueue, keyHoverElement, keySelectedElementList } from './config';
|
|
4
|
+
import { MIDDLEWARE_INTERNAL_EVENT_SHOW_INFO_ANGLE } from '../info';
|
|
5
|
+
export { keySelectedElementList, keyHoverElement, keyActionType, keyResizeType, keyGroupQueue };
|
|
6
|
+
export type { DeepSelectorSharedStorage, ActionType };
|
|
7
|
+
export declare const MiddlewareSelector: BoardMiddleware<DeepSelectorSharedStorage, CoreEventMap & {
|
|
8
|
+
[MIDDLEWARE_INTERNAL_EVENT_SHOW_INFO_ANGLE]: {
|
|
9
|
+
show: boolean;
|
|
10
|
+
};
|
|
11
|
+
}, MiddlewareSelectorConfig>;
|