@logicflow/extension 1.1.0-alpha.2 → 1.1.0-alpha.6
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/cjs/NodeResize/Control/Control.js +9 -9
- package/cjs/NodeResize/Control/ControlGroup.js +8 -4
- package/cjs/NodeResize/Node/DiamondResize.js +21 -1
- package/cjs/NodeResize/Node/EllipseResize.js +15 -0
- package/cjs/NodeResize/Node/HtmlResize.js +15 -0
- package/cjs/NodeResize/Node/RectResize.js +19 -0
- package/cjs/NodeResize/index.js +2 -36
- package/cjs/materials/group/GroupNode.js +197 -23
- package/cjs/materials/group/index.js +28 -9
- package/cjs/style/index.css +3 -2
- package/cjs/tools/snapshot/index.js +7 -2
- package/es/NodeResize/Control/Control.js +9 -9
- package/es/NodeResize/Control/ControlGroup.js +8 -4
- package/es/NodeResize/Node/DiamondResize.d.ts +15 -0
- package/es/NodeResize/Node/DiamondResize.js +21 -1
- package/es/NodeResize/Node/EllipseResize.d.ts +11 -0
- package/es/NodeResize/Node/EllipseResize.js +15 -0
- package/es/NodeResize/Node/HtmlResize.d.ts +11 -0
- package/es/NodeResize/Node/HtmlResize.js +15 -0
- package/es/NodeResize/Node/RectResize.d.ts +13 -0
- package/es/NodeResize/Node/RectResize.js +19 -0
- package/es/NodeResize/index.d.ts +2 -28
- package/es/NodeResize/index.js +1 -36
- package/es/materials/group/GroupNode.d.ts +42 -11
- package/es/materials/group/GroupNode.js +198 -24
- package/es/materials/group/index.d.ts +3 -1
- package/es/materials/group/index.js +27 -9
- package/es/style/index.css +3 -2
- package/es/tools/snapshot/index.js +7 -2
- package/lib/AutoLayout.js +1 -1
- package/lib/BpmnAdapter.js +1 -1
- package/lib/BpmnElement.js +1 -1
- package/lib/ContextMenu.js +1 -1
- package/lib/Control.js +1 -1
- package/lib/CurvedEdge.js +1 -1
- package/lib/DndPanel.js +1 -1
- package/lib/FlowPath.js +1 -1
- package/lib/Group.js +1 -1
- package/lib/InsertNodeInPolyline.js +1 -1
- package/lib/Menu.js +1 -1
- package/lib/MiniMap.js +1 -1
- package/lib/NodeResize.js +1 -1
- package/lib/RectLabelNode.js +1 -1
- package/lib/SelectionSelect.js +1 -1
- package/lib/Snapshot.js +1 -1
- package/lib/TurboAdapter.js +1 -1
- package/lib/lfJson2Xml.js +1 -1
- package/lib/lfXml2Json.js +1 -1
- package/lib/style/index.css +3 -2
- package/package.json +2 -2
- package/types/NodeResize/Node/DiamondResize.d.ts +15 -0
- package/types/NodeResize/Node/EllipseResize.d.ts +11 -0
- package/types/NodeResize/Node/HtmlResize.d.ts +11 -0
- package/types/NodeResize/Node/RectResize.d.ts +13 -0
- package/types/NodeResize/index.d.ts +2 -28
- package/types/group-shrink/index.d.ts +28 -0
- package/types/materials/group/GroupNode.d.ts +42 -11
- package/types/materials/group/index.d.ts +3 -1
|
@@ -26,7 +26,6 @@ import { h, Component } from 'preact';
|
|
|
26
26
|
import { LogicFlowUtil } from '@logicflow/core';
|
|
27
27
|
import Rect from '../BasicShape/Rect';
|
|
28
28
|
import { getDiamondReizeEdgePoint, getEllipseReizeEdgePoint, getRectReizeEdgePoint, ModelType } from './Util';
|
|
29
|
-
import NodeResize from '../index';
|
|
30
29
|
var createDrag = LogicFlowUtil.createDrag;
|
|
31
30
|
var Control = /** @class */ (function (_super) {
|
|
32
31
|
__extends(Control, _super);
|
|
@@ -211,11 +210,11 @@ var Control = /** @class */ (function (_super) {
|
|
|
211
210
|
pct: 1 / 2,
|
|
212
211
|
});
|
|
213
212
|
// 限制放大缩小的最大最小范围
|
|
214
|
-
var _c =
|
|
215
|
-
if (size.width <
|
|
216
|
-
|| size.width >
|
|
217
|
-
|| size.height <
|
|
218
|
-
|| size.height >
|
|
213
|
+
var _c = _this.nodeModel, minWidth = _c.minWidth, minHeight = _c.minHeight, maxWidth = _c.maxWidth, maxHeight = _c.maxHeight;
|
|
214
|
+
if (size.width < (minWidth / 2)
|
|
215
|
+
|| size.width > (maxWidth / 2)
|
|
216
|
+
|| size.height < (minHeight / 2)
|
|
217
|
+
|| size.height > (maxHeight / 2)) {
|
|
219
218
|
return;
|
|
220
219
|
}
|
|
221
220
|
// 更新中心点位置,更新文案位置
|
|
@@ -271,6 +270,7 @@ var Control = /** @class */ (function (_super) {
|
|
|
271
270
|
// html和矩形的计算方式是一样的,共用一个方法
|
|
272
271
|
if (modelType === ModelType.RECT_NODE || modelType === ModelType.HTML_NODE) {
|
|
273
272
|
_this.updateRect({ deltaX: deltaX, deltaY: deltaY });
|
|
273
|
+
// this.nodeModel.resize(deltaX, deltaY);
|
|
274
274
|
}
|
|
275
275
|
else if (modelType === ModelType.ELLIPSE_NODE) {
|
|
276
276
|
_this.updateEllipse({ deltaX: deltaX, deltaY: deltaY });
|
|
@@ -313,10 +313,10 @@ var Control = /** @class */ (function (_super) {
|
|
|
313
313
|
return { sourceEdges: sourceEdges, targetEdges: targetEdges };
|
|
314
314
|
};
|
|
315
315
|
Control.prototype.render = function () {
|
|
316
|
-
var _a = this.props, x = _a.x, y = _a.y,
|
|
317
|
-
var
|
|
316
|
+
var _a = this.props, x = _a.x, y = _a.y, index = _a.index, model = _a.model;
|
|
317
|
+
var style = model.getControlPointStyle();
|
|
318
318
|
return (h("g", { className: "lf-resize-control-" + index },
|
|
319
|
-
h(Rect, __assign({ className: "lf-node-control" }, { x: x, y: y }, style, {
|
|
319
|
+
h(Rect, __assign({ className: "lf-node-control" }, { x: x, y: y }, style, { onMouseDown: this.dragHandler }))));
|
|
320
320
|
};
|
|
321
321
|
return Control;
|
|
322
322
|
}(Component));
|
|
@@ -25,7 +25,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
import { h, Component } from 'preact';
|
|
26
26
|
import Control from './Control';
|
|
27
27
|
import Rect from '../BasicShape/Rect';
|
|
28
|
-
import NodeResize from '../index';
|
|
29
28
|
var ControlGroup = /** @class */ (function (_super) {
|
|
30
29
|
__extends(ControlGroup, _super);
|
|
31
30
|
function ControlGroup() {
|
|
@@ -44,18 +43,22 @@ var ControlGroup = /** @class */ (function (_super) {
|
|
|
44
43
|
};
|
|
45
44
|
var minX = box.minX, minY = box.minY, maxX = box.maxX, maxY = box.maxY;
|
|
46
45
|
var controlList = [
|
|
46
|
+
// 左上角
|
|
47
47
|
{
|
|
48
48
|
x: minX,
|
|
49
49
|
y: minY,
|
|
50
50
|
},
|
|
51
|
+
// 右上角
|
|
51
52
|
{
|
|
52
53
|
x: maxX,
|
|
53
54
|
y: minY,
|
|
54
55
|
},
|
|
56
|
+
// 右下角
|
|
55
57
|
{
|
|
56
58
|
x: maxX,
|
|
57
59
|
y: maxY,
|
|
58
60
|
},
|
|
61
|
+
// 左下角
|
|
59
62
|
{
|
|
60
63
|
x: minX,
|
|
61
64
|
y: maxY,
|
|
@@ -65,9 +68,10 @@ var ControlGroup = /** @class */ (function (_super) {
|
|
|
65
68
|
};
|
|
66
69
|
// 一般节点被选中了会有outline, 先不用这个
|
|
67
70
|
ControlGroup.prototype.getGroupSolid = function () {
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
+
var model = this.props.model;
|
|
72
|
+
var x = model.x, y = model.y, width = model.width, height = model.height;
|
|
73
|
+
var style = model.getResizeOutlineStyle();
|
|
74
|
+
return (h(Rect, __assign({ fill: "none" }, style, { x: x, y: y, width: width, height: height })));
|
|
71
75
|
};
|
|
72
76
|
ControlGroup.prototype.render = function () {
|
|
73
77
|
return (h("g", { className: "lf-resize-control" },
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { h, DiamondNode, DiamondNodeModel } from '@logicflow/core';
|
|
2
2
|
declare class DiamondResizeModel extends DiamondNodeModel {
|
|
3
|
+
minWidth: number;
|
|
4
|
+
minHeight: number;
|
|
5
|
+
maxWidth: number;
|
|
6
|
+
maxHeight: number;
|
|
3
7
|
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
8
|
+
getResizeOutlineStyle(): {
|
|
9
|
+
stroke: string;
|
|
10
|
+
strokeWidth: number;
|
|
11
|
+
strokeDasharray: string;
|
|
12
|
+
};
|
|
13
|
+
getControlPointStyle(): {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
fill: string;
|
|
17
|
+
stroke: string;
|
|
18
|
+
};
|
|
4
19
|
setAttributes(): void;
|
|
5
20
|
}
|
|
6
21
|
declare class DiamondResizeView extends DiamondNode {
|
|
@@ -28,7 +28,12 @@ import Polygon from '../BasicShape/Polygon';
|
|
|
28
28
|
var DiamondResizeModel = /** @class */ (function (_super) {
|
|
29
29
|
__extends(DiamondResizeModel, _super);
|
|
30
30
|
function DiamondResizeModel() {
|
|
31
|
-
|
|
31
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
32
|
+
_this.minWidth = 30;
|
|
33
|
+
_this.minHeight = 30;
|
|
34
|
+
_this.maxWidth = 2000;
|
|
35
|
+
_this.maxHeight = 2000;
|
|
36
|
+
return _this;
|
|
32
37
|
}
|
|
33
38
|
DiamondResizeModel.prototype.getOutlineStyle = function () {
|
|
34
39
|
var style = _super.prototype.getOutlineStyle.call(this);
|
|
@@ -38,6 +43,21 @@ var DiamondResizeModel = /** @class */ (function (_super) {
|
|
|
38
43
|
}
|
|
39
44
|
return style;
|
|
40
45
|
};
|
|
46
|
+
DiamondResizeModel.prototype.getResizeOutlineStyle = function () {
|
|
47
|
+
return {
|
|
48
|
+
stroke: '#000000',
|
|
49
|
+
strokeWidth: 1,
|
|
50
|
+
strokeDasharray: '3,3',
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
DiamondResizeModel.prototype.getControlPointStyle = function () {
|
|
54
|
+
return {
|
|
55
|
+
width: 7,
|
|
56
|
+
height: 7,
|
|
57
|
+
fill: '#FFFFFF',
|
|
58
|
+
stroke: '#000000',
|
|
59
|
+
};
|
|
60
|
+
};
|
|
41
61
|
DiamondResizeModel.prototype.setAttributes = function () {
|
|
42
62
|
// @ts-ignore
|
|
43
63
|
var nodeSize = this.properties.nodeSize;
|
|
@@ -6,6 +6,17 @@ declare class EllipseResizeModel extends EllipseNodeModel {
|
|
|
6
6
|
maxHeight: number;
|
|
7
7
|
constructor(data: any, graphModel: any);
|
|
8
8
|
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
9
|
+
getResizeOutlineStyle(): {
|
|
10
|
+
stroke: string;
|
|
11
|
+
strokeWidth: number;
|
|
12
|
+
strokeDasharray: string;
|
|
13
|
+
};
|
|
14
|
+
getControlPointStyle(): {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
fill: string;
|
|
18
|
+
stroke: string;
|
|
19
|
+
};
|
|
9
20
|
setAttributes(): void;
|
|
10
21
|
}
|
|
11
22
|
declare class EllipseResizeView extends EllipseNode {
|
|
@@ -33,6 +33,21 @@ var EllipseResizeModel = /** @class */ (function (_super) {
|
|
|
33
33
|
}
|
|
34
34
|
return style;
|
|
35
35
|
};
|
|
36
|
+
EllipseResizeModel.prototype.getResizeOutlineStyle = function () {
|
|
37
|
+
return {
|
|
38
|
+
stroke: '#000000',
|
|
39
|
+
strokeWidth: 1,
|
|
40
|
+
strokeDasharray: '3,3',
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
EllipseResizeModel.prototype.getControlPointStyle = function () {
|
|
44
|
+
return {
|
|
45
|
+
width: 7,
|
|
46
|
+
height: 7,
|
|
47
|
+
fill: '#FFFFFF',
|
|
48
|
+
stroke: '#000000',
|
|
49
|
+
};
|
|
50
|
+
};
|
|
36
51
|
EllipseResizeModel.prototype.setAttributes = function () {
|
|
37
52
|
// @ts-ignore
|
|
38
53
|
var nodeSize = this.properties.nodeSize;
|
|
@@ -5,6 +5,17 @@ declare class HtmlResizeModel extends HtmlNodeModel {
|
|
|
5
5
|
maxWidth: number;
|
|
6
6
|
maxHeight: number;
|
|
7
7
|
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
8
|
+
getResizeOutlineStyle(): {
|
|
9
|
+
stroke: string;
|
|
10
|
+
strokeWidth: number;
|
|
11
|
+
strokeDasharray: string;
|
|
12
|
+
};
|
|
13
|
+
getControlPointStyle(): {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
fill: string;
|
|
17
|
+
stroke: string;
|
|
18
|
+
};
|
|
8
19
|
setAttributes(): void;
|
|
9
20
|
}
|
|
10
21
|
declare class HtmlResizeView extends HtmlNode {
|
|
@@ -31,6 +31,21 @@ var HtmlResizeModel = /** @class */ (function (_super) {
|
|
|
31
31
|
}
|
|
32
32
|
return style;
|
|
33
33
|
};
|
|
34
|
+
HtmlResizeModel.prototype.getResizeOutlineStyle = function () {
|
|
35
|
+
return {
|
|
36
|
+
stroke: '#000000',
|
|
37
|
+
strokeWidth: 1,
|
|
38
|
+
strokeDasharray: '3,3',
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
HtmlResizeModel.prototype.getControlPointStyle = function () {
|
|
42
|
+
return {
|
|
43
|
+
width: 7,
|
|
44
|
+
height: 7,
|
|
45
|
+
fill: '#FFFFFF',
|
|
46
|
+
stroke: '#000000',
|
|
47
|
+
};
|
|
48
|
+
};
|
|
34
49
|
HtmlResizeModel.prototype.setAttributes = function () {
|
|
35
50
|
// @ts-ignore
|
|
36
51
|
var nodeSize = this.properties.nodeSize;
|
|
@@ -5,7 +5,20 @@ declare class RectResizeModel extends RectNodeModel {
|
|
|
5
5
|
maxWidth: number;
|
|
6
6
|
maxHeight: number;
|
|
7
7
|
getOutlineStyle(): import("@logicflow/core/types/constant/DefaultTheme").OutlineTheme;
|
|
8
|
+
getResizeOutlineStyle(): {
|
|
9
|
+
fill: string;
|
|
10
|
+
stroke: string;
|
|
11
|
+
strokeWidth: number;
|
|
12
|
+
strokeDasharray: string;
|
|
13
|
+
};
|
|
14
|
+
getControlPointStyle(): {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
fill: string;
|
|
18
|
+
stroke: string;
|
|
19
|
+
};
|
|
8
20
|
setAttributes(): void;
|
|
21
|
+
resize(deltaX: any, deltaY: any): void;
|
|
9
22
|
}
|
|
10
23
|
declare class RectResizeView extends RectNode {
|
|
11
24
|
getControlGroup(): h.JSX.Element;
|
|
@@ -31,6 +31,22 @@ var RectResizeModel = /** @class */ (function (_super) {
|
|
|
31
31
|
}
|
|
32
32
|
return style;
|
|
33
33
|
};
|
|
34
|
+
RectResizeModel.prototype.getResizeOutlineStyle = function () {
|
|
35
|
+
return {
|
|
36
|
+
fill: 'none',
|
|
37
|
+
stroke: '#000000',
|
|
38
|
+
strokeWidth: 1,
|
|
39
|
+
strokeDasharray: '3,3',
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
RectResizeModel.prototype.getControlPointStyle = function () {
|
|
43
|
+
return {
|
|
44
|
+
width: 7,
|
|
45
|
+
height: 7,
|
|
46
|
+
fill: '#FFFFFF',
|
|
47
|
+
stroke: '#000000',
|
|
48
|
+
};
|
|
49
|
+
};
|
|
34
50
|
RectResizeModel.prototype.setAttributes = function () {
|
|
35
51
|
// @ts-ignore
|
|
36
52
|
var nodeSize = this.properties.nodeSize;
|
|
@@ -39,6 +55,9 @@ var RectResizeModel = /** @class */ (function (_super) {
|
|
|
39
55
|
this.height = nodeSize.height;
|
|
40
56
|
}
|
|
41
57
|
};
|
|
58
|
+
RectResizeModel.prototype.resize = function (deltaX, deltaY) {
|
|
59
|
+
console.log(deltaX, deltaY);
|
|
60
|
+
};
|
|
42
61
|
return RectResizeModel;
|
|
43
62
|
}(RectNodeModel));
|
|
44
63
|
var RectResizeView = /** @class */ (function (_super) {
|
package/es/NodeResize/index.d.ts
CHANGED
|
@@ -1,37 +1,11 @@
|
|
|
1
1
|
import RectResize from './Node/RectResize';
|
|
2
2
|
import EllipseResize from './Node/EllipseResize';
|
|
3
3
|
import DiamondResize from './Node/DiamondResize';
|
|
4
|
+
import HtmlResize from './Node/HtmlResize';
|
|
4
5
|
declare const NodeResize: {
|
|
5
6
|
pluginName: string;
|
|
6
7
|
step: number;
|
|
7
|
-
style: {
|
|
8
|
-
outline: {
|
|
9
|
-
stroke: string;
|
|
10
|
-
strokeWidth: number;
|
|
11
|
-
strokeDasharray: string;
|
|
12
|
-
};
|
|
13
|
-
controlPoint: {
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
fill: string;
|
|
17
|
-
stroke: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
sizeRange: {
|
|
21
|
-
ellipse: {
|
|
22
|
-
minRx: number;
|
|
23
|
-
minRy: number;
|
|
24
|
-
maxRx: number;
|
|
25
|
-
maxRy: number;
|
|
26
|
-
};
|
|
27
|
-
diamond: {
|
|
28
|
-
minRx: number;
|
|
29
|
-
minRy: number;
|
|
30
|
-
maxRx: number;
|
|
31
|
-
maxRy: number;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
8
|
install(lf: any): void;
|
|
35
9
|
};
|
|
36
10
|
export default NodeResize;
|
|
37
|
-
export { NodeResize, RectResize, EllipseResize, DiamondResize, };
|
|
11
|
+
export { NodeResize, RectResize, EllipseResize, DiamondResize, HtmlResize, };
|
package/es/NodeResize/index.js
CHANGED
|
@@ -6,41 +6,6 @@ var NodeResize = {
|
|
|
6
6
|
pluginName: 'nodeResize',
|
|
7
7
|
// 拖动step
|
|
8
8
|
step: 0,
|
|
9
|
-
// 边框和contol拖动点样式的设置
|
|
10
|
-
style: {
|
|
11
|
-
outline: {
|
|
12
|
-
stroke: '#000000',
|
|
13
|
-
strokeWidth: 1,
|
|
14
|
-
strokeDasharray: '3,3',
|
|
15
|
-
},
|
|
16
|
-
controlPoint: {
|
|
17
|
-
width: 7,
|
|
18
|
-
height: 7,
|
|
19
|
-
fill: '#FFFFFF',
|
|
20
|
-
stroke: '#000000',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
// 缩放范围
|
|
24
|
-
sizeRange: {
|
|
25
|
-
// rect: {
|
|
26
|
-
// minWidth: 30,
|
|
27
|
-
// minHeight: 30,
|
|
28
|
-
// maxWidth: 300,
|
|
29
|
-
// maxHeight: 300,
|
|
30
|
-
// },
|
|
31
|
-
ellipse: {
|
|
32
|
-
minRx: 15,
|
|
33
|
-
minRy: 15,
|
|
34
|
-
maxRx: 150,
|
|
35
|
-
maxRy: 150,
|
|
36
|
-
},
|
|
37
|
-
diamond: {
|
|
38
|
-
minRx: 15,
|
|
39
|
-
minRy: 15,
|
|
40
|
-
maxRx: 150,
|
|
41
|
-
maxRy: 150,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
9
|
install: function (lf) {
|
|
45
10
|
lf.register({
|
|
46
11
|
type: RectResize.type,
|
|
@@ -65,4 +30,4 @@ var NodeResize = {
|
|
|
65
30
|
},
|
|
66
31
|
};
|
|
67
32
|
export default NodeResize;
|
|
68
|
-
export { NodeResize, RectResize, EllipseResize, DiamondResize, };
|
|
33
|
+
export { NodeResize, RectResize, EllipseResize, DiamondResize, HtmlResize, };
|
|
@@ -1,13 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { h } from '@logicflow/core';
|
|
2
|
+
import { RectResize } from '../../NodeResize';
|
|
3
|
+
declare class GroupNodeModel extends RectResize.model {
|
|
3
4
|
readonly isGroup = true;
|
|
4
|
-
children: Set<
|
|
5
|
+
children: Set<string>;
|
|
5
6
|
isRestrict: boolean;
|
|
6
|
-
|
|
7
|
+
resizable: boolean;
|
|
8
|
+
foldable: boolean;
|
|
9
|
+
foldedWidth: number;
|
|
10
|
+
foldedHeight: number;
|
|
11
|
+
unfoldedWidth: number;
|
|
12
|
+
unfoldedHight: number;
|
|
13
|
+
initNodeData(data: any): void;
|
|
14
|
+
getResizeOutlineStyle(): {
|
|
15
|
+
fill: string;
|
|
16
|
+
stroke: string;
|
|
17
|
+
strokeWidth: number;
|
|
18
|
+
strokeDasharray: string;
|
|
19
|
+
};
|
|
20
|
+
foldGroup(isFolded: any): void;
|
|
7
21
|
/**
|
|
8
|
-
*
|
|
22
|
+
* 折叠分组的时候,处理分组内部子节点上的连线
|
|
23
|
+
* 1. 为了保证校验规则不被打乱,所以只隐藏子节点上面的连线。
|
|
24
|
+
* 2. 重新创建一个属性一样的边。
|
|
25
|
+
* 3. 这个边拥有virtual=true的属性,表示不支持直接修改此边内容。
|
|
9
26
|
*/
|
|
10
|
-
|
|
27
|
+
private foldEdge;
|
|
11
28
|
isInRange({ x1, y1, x2, y2 }: {
|
|
12
29
|
x1: any;
|
|
13
30
|
y1: any;
|
|
@@ -15,15 +32,29 @@ declare class GroupNodeModel extends RectNodeModel {
|
|
|
15
32
|
y2: any;
|
|
16
33
|
}): boolean;
|
|
17
34
|
setAllowAppendChild(isAllow: any): void;
|
|
35
|
+
/**
|
|
36
|
+
* 添加分组子节点
|
|
37
|
+
* @param id 节点id
|
|
38
|
+
*/
|
|
18
39
|
addChild(id: any): void;
|
|
40
|
+
/**
|
|
41
|
+
* 删除分组子节点
|
|
42
|
+
* @param id 节点id
|
|
43
|
+
*/
|
|
19
44
|
removeChild(id: any): void;
|
|
45
|
+
getAddableOutlineStyle(): {
|
|
46
|
+
stroke: string;
|
|
47
|
+
strokeWidth: number;
|
|
48
|
+
strokeDasharray: string;
|
|
49
|
+
fill: string;
|
|
50
|
+
};
|
|
20
51
|
getData(): import("@logicflow/core").NodeData;
|
|
21
52
|
}
|
|
22
|
-
declare class GroupNode extends
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
53
|
+
declare class GroupNode extends RectResize.view {
|
|
54
|
+
getControlGroup(): h.JSX.Element;
|
|
55
|
+
getAddedableShape(): import("preact").VNode<any>;
|
|
56
|
+
getFoldIcon(): import("preact").VNode<any>;
|
|
57
|
+
getResizeShape(): import("preact").VNode<any>;
|
|
27
58
|
}
|
|
28
59
|
declare const _default: {
|
|
29
60
|
type: string;
|