dcim-topology2d 1.1.3 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/activity-diagram/src/final/final.d.ts +1 -1
- package/activity-diagram/src/final/final.rect.d.ts +1 -1
- package/activity-diagram/src/final/final.rect.js +1 -1
- package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
- package/activity-diagram/src/fork/fork.anchor.js +1 -1
- package/activity-diagram/src/fork/fork.d.ts +1 -1
- package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
- package/activity-diagram/src/fork/fork.rect.js +1 -1
- package/activity-diagram/src/register.js +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
- package/chart-diagram/src/echarts/index.d.ts +1 -1
- package/chart-diagram/src/echarts/index.js +7 -10
- package/chart-diagram/src/register.js +1 -1
- package/class-diagram/src/class/class.d.ts +1 -1
- package/class-diagram/src/class/class.rect.d.ts +1 -1
- package/class-diagram/src/class/class.rect.js +1 -1
- package/class-diagram/src/register.js +1 -1
- package/core/index.d.ts +0 -1
- package/core/index.js +0 -1
- package/core/src/activeLayer.d.ts +10 -2
- package/core/src/activeLayer.js +41 -42
- package/core/src/animateLayer.d.ts +7 -3
- package/core/src/animateLayer.js +12 -10
- package/core/src/calling.d.ts +4 -1
- package/core/src/calling.js +41 -40
- package/core/src/canvas.d.ts +6 -1
- package/core/src/canvas.js +18 -17
- package/core/src/common.d.ts +5 -5
- package/core/src/common.js +115 -161
- package/core/src/core.d.ts +4 -3
- package/core/src/core.js +253 -228
- package/core/src/divLayer.d.ts +7 -2
- package/core/src/divLayer.js +25 -25
- package/core/src/healps/changeData.d.ts +1 -1
- package/core/src/healps/changeData.js +42 -77
- package/core/src/hoverLayer.d.ts +9 -2
- package/core/src/hoverLayer.js +34 -31
- package/core/src/models/data.d.ts +26 -0
- package/core/src/models/data.js +77 -0
- package/core/src/models/data.js.map +1 -0
- package/core/src/models/index.d.ts +1 -0
- package/core/src/models/index.js +1 -0
- package/core/src/models/node.js +12 -14
- package/core/src/models/pen.js +1 -10
- package/core/src/mqtt.d.ts +14 -0
- package/core/src/mqtt.js +82 -0
- package/core/src/mqtt.js.map +1 -0
- package/core/src/offscreen.d.ts +4 -1
- package/core/src/offscreen.js +8 -10
- package/core/src/options.js +0 -1
- package/core/src/poll.js +2 -0
- package/core/src/preview.d.ts +13 -1
- package/core/src/preview.js +34 -42
- package/core/src/renderLayer.d.ts +3 -1
- package/core/src/renderLayer.js +31 -26
- package/core/src/socket.d.ts +10 -0
- package/core/src/socket.js +51 -0
- package/core/src/socket.js.map +1 -0
- package/core/src/utils/canvas.js +1 -1
- package/core/src/utils/conversion.d.ts +0 -7
- package/core/src/utils/conversion.js +0 -54
- package/core/src/utils/dom.d.ts +5 -4
- package/core/src/utils/dom.js +1 -3
- package/core/src/utils/onmousevent.js +3 -12
- package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
- package/flow-diagram/src/comment/comment.anchor.js +1 -1
- package/flow-diagram/src/comment/comment.d.ts +1 -1
- package/flow-diagram/src/data/data.anchor.d.ts +1 -1
- package/flow-diagram/src/data/data.anchor.js +1 -1
- package/flow-diagram/src/data/data.d.ts +1 -1
- package/flow-diagram/src/data/data.rect.d.ts +1 -1
- package/flow-diagram/src/data/data.rect.js +1 -1
- package/flow-diagram/src/db/db.d.ts +1 -1
- package/flow-diagram/src/db/db.rect.d.ts +1 -1
- package/flow-diagram/src/db/db.rect.js +1 -1
- package/flow-diagram/src/display/display.anchor.d.ts +1 -1
- package/flow-diagram/src/display/display.anchor.js +1 -1
- package/flow-diagram/src/display/display.d.ts +1 -1
- package/flow-diagram/src/display/display.rect.d.ts +1 -1
- package/flow-diagram/src/display/display.rect.js +1 -1
- package/flow-diagram/src/document/document.anchor.d.ts +1 -1
- package/flow-diagram/src/document/document.anchor.js +1 -1
- package/flow-diagram/src/document/document.d.ts +1 -1
- package/flow-diagram/src/document/document.rect.d.ts +1 -1
- package/flow-diagram/src/document/document.rect.js +1 -1
- package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
- package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
- package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
- package/flow-diagram/src/manually/manually.anchor.js +1 -1
- package/flow-diagram/src/manually/manually.d.ts +1 -1
- package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
- package/flow-diagram/src/manually/manually.rect.js +1 -1
- package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
- package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
- package/flow-diagram/src/parallel/parallel.d.ts +1 -1
- package/flow-diagram/src/queue/queue.d.ts +1 -1
- package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
- package/flow-diagram/src/queue/queue.rect.js +1 -1
- package/flow-diagram/src/register.js +1 -1
- package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
- package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
- package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
- package/layout/src/align.d.ts +1 -1
- package/layout/src/align.js +1 -1
- package/layout/src/layout.d.ts +1 -1
- package/layout/src/layout.js +1 -1
- package/myShape-diagram/myShape.js +1 -1
- package/package.json +1 -1
- package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.anchor.js +1 -1
- package/sequence-diagram/src/focus/focus.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.rect.js +1 -1
- package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
- package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
- package/sequence-diagram/src/register.js +1 -1
- package/core/src/store/common.d.ts +0 -9
- package/core/src/store/common.js +0 -5
- package/core/src/store/data.d.ts +0 -126
- package/core/src/store/data.js +0 -80
- package/core/src/store/index.d.ts +0 -2
- package/core/src/store/index.js +0 -2
- package/static/echartsDefaultData.js +0 -95
- package/static/index.js +0 -1
- package/style/index.css +0 -10
@@ -0,0 +1,51 @@
|
|
1
|
+
import { EventType } from './models';
|
2
|
+
var Socket = /** @class */ (function () {
|
3
|
+
function Socket(url, data) {
|
4
|
+
var _this = this;
|
5
|
+
this.url = url;
|
6
|
+
this.data = data;
|
7
|
+
this.onmessage = function (e) {
|
8
|
+
if (!_this.data.pens.length || !e || !e.data) {
|
9
|
+
return;
|
10
|
+
}
|
11
|
+
var msg;
|
12
|
+
try {
|
13
|
+
msg = JSON.parse(e.data);
|
14
|
+
}
|
15
|
+
catch (error) {
|
16
|
+
msg = e.data;
|
17
|
+
}
|
18
|
+
for (var _i = 0, _a = _this.data.pens; _i < _a.length; _i++) {
|
19
|
+
var item = _a[_i];
|
20
|
+
for (var _b = 0, _c = item.events; _b < _c.length; _b++) {
|
21
|
+
var event_1 = _c[_b];
|
22
|
+
if (event_1.type === EventType.WebSocket) {
|
23
|
+
if (event_1.name && event_1.name === msg.event) {
|
24
|
+
item.doSocketMqtt(event_1, msg.data, _this.socket);
|
25
|
+
}
|
26
|
+
else if (!event_1.name && msg) {
|
27
|
+
item.doSocketMqtt(event_1, msg, _this.socket);
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
};
|
33
|
+
this.init();
|
34
|
+
}
|
35
|
+
Socket.prototype.init = function () {
|
36
|
+
var _this = this;
|
37
|
+
this.socket = new WebSocket(this.url);
|
38
|
+
this.socket.onmessage = this.onmessage;
|
39
|
+
this.socket.onclose = function () {
|
40
|
+
console.log('Canvas websocket closed and reconneting...');
|
41
|
+
_this.init();
|
42
|
+
};
|
43
|
+
};
|
44
|
+
Socket.prototype.close = function () {
|
45
|
+
this.socket.onclose = null;
|
46
|
+
this.socket.close();
|
47
|
+
};
|
48
|
+
return Socket;
|
49
|
+
}());
|
50
|
+
export { Socket };
|
51
|
+
//# sourceMappingURL=socket.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"socket.js","sourceRoot":"","sources":["../../../packages/core/src/socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,UAAU,CAAC;AAEnD;IAEE,gBAAmB,GAAW,EAAS,IAAkB;QAAzD,iBAEC;QAFkB,QAAG,GAAH,GAAG,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAc;QAczD,cAAS,GAAG,UAAC,CAAe;YAC1B,IAAI,CAAC,KAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;gBAC3C,OAAO;aACR;YAED,IAAI,GAAkC,CAAC;YACvC,IAAI;gBACF,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC1B;YAAC,OAAO,KAAK,EAAE;gBACd,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC;aACd;YAED,KAAmB,UAAc,EAAd,KAAA,KAAI,CAAC,IAAI,CAAC,IAAI,EAAd,cAAc,EAAd,IAAc,EAAE;gBAA9B,IAAM,IAAI,SAAA;gBACb,KAAoB,UAAW,EAAX,KAAA,IAAI,CAAC,MAAM,EAAX,cAAW,EAAX,IAAW,EAAE;oBAA5B,IAAM,OAAK,SAAA;oBACd,IAAI,OAAK,CAAC,IAAI,KAAK,SAAS,CAAC,SAAS,EAAE;wBACtC,IAAI,OAAK,CAAC,IAAI,IAAI,OAAK,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,EAAE;4BAC1C,IAAI,CAAC,YAAY,CAAC,OAAK,EAAE,GAAG,CAAC,IAAI,EAAE,KAAI,CAAC,MAAM,CAAC,CAAC;yBACjD;6BAAM,IAAI,CAAC,OAAK,CAAC,IAAI,IAAI,GAAG,EAAE;4BAC7B,IAAI,CAAC,YAAY,CAAC,OAAK,EAAE,GAAG,EAAE,KAAI,CAAC,MAAM,CAAC,CAAC;yBAC5C;qBACF;iBACF;aACF;QACH,CAAC,CAAC;QApCA,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,qBAAI,GAAJ;QAAA,iBAQC;QAPC,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAEvC,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG;YACpB,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;YAC1D,KAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;IA2BD,sBAAK,GAAL;QACE,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IACH,aAAC;AAAD,CAAC,AA7CD,IA6CC"}
|
package/core/src/utils/canvas.js
CHANGED
@@ -1,7 +0,0 @@
|
|
1
|
-
import {Node} from "../models";
|
2
|
-
|
3
|
-
export declare function setTagIdData(data: any): [];
|
4
|
-
export declare function setKpiAddrData(data: any): [];
|
5
|
-
export declare function setAssetIdData(data: any): [];
|
6
|
-
export declare function setAreaIdData(data: any): [];
|
7
|
-
export declare function setThreeCategoryIdData(pen: Node, data: any): [];
|
@@ -1,54 +0,0 @@
|
|
1
|
-
export function setTagIdData(data) {
|
2
|
-
return [{
|
3
|
-
"key": "tagId",
|
4
|
-
"value": data.tagId,
|
5
|
-
"isControlDis": data.isControlDis,
|
6
|
-
"type": data.tagType,
|
7
|
-
"tagVal": data.value,
|
8
|
-
"valExplain": data.valExplain,
|
9
|
-
"tagId": data.tagId
|
10
|
-
}, {
|
11
|
-
"key": "测点名称",
|
12
|
-
"value": data.tagName
|
13
|
-
}];
|
14
|
-
}
|
15
|
-
export function setKpiAddrData(data) {
|
16
|
-
return [{
|
17
|
-
"key": "kpiAddr",
|
18
|
-
"value": data.kpiId + '_' + data.kpiAddr,
|
19
|
-
"isControlDis": data.isControlDis,
|
20
|
-
"type": data.tagType
|
21
|
-
}, {
|
22
|
-
"key": "指标名称",
|
23
|
-
"value": data.kpiName
|
24
|
-
}];
|
25
|
-
}
|
26
|
-
export function setAssetIdData(data) {
|
27
|
-
return [{
|
28
|
-
"key": "assetId",
|
29
|
-
"value": data.id
|
30
|
-
}, {
|
31
|
-
"key": "资产名称",
|
32
|
-
"value": data.name
|
33
|
-
}];
|
34
|
-
}
|
35
|
-
export function setAreaIdData(data) {
|
36
|
-
return [{
|
37
|
-
"key": "areaId",
|
38
|
-
"value": data.id
|
39
|
-
}, {
|
40
|
-
"key": "区域名称",
|
41
|
-
"value": data.name
|
42
|
-
}];
|
43
|
-
}
|
44
|
-
export function setThreeCategoryIdData(pen, data) {
|
45
|
-
let params = [];
|
46
|
-
const hasThreeCategoryId = pen.data.find((tc) => {
|
47
|
-
return tc.key === 'threeCategoryId' && tc.value.includes(data.threeCategoryId);
|
48
|
-
});
|
49
|
-
if(!hasThreeCategoryId) params = [{
|
50
|
-
"key": "threeCategoryId",
|
51
|
-
"value": data.threeCategoryId
|
52
|
-
}];
|
53
|
-
return params;
|
54
|
-
}
|
package/core/src/utils/dom.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
import { Node } from '../models';
|
2
|
-
|
1
|
+
import { Node } from '../models/node';
|
2
|
+
// @ts-ignore
|
3
|
+
import { TopologyData } from 'dcim-topology/core'
|
3
4
|
export declare let DomElements: {};
|
4
|
-
export declare function createChildrenDivByElementId(node: Node, data?:
|
5
|
-
export declare function setStyleForElementIdDiv(node: Node, elem: HTMLElement, data:
|
5
|
+
export declare function createChildrenDivByElementId(node: Node, data?: TopologyData): HTMLDivElement;
|
6
|
+
export declare function setStyleForElementIdDiv(node: Node, elem: HTMLElement, data: TopologyData): void;
|
6
7
|
export declare function createDiv(node: Node): HTMLDivElement;
|
7
8
|
export declare function loadJS(url: string, callback?: () => void, render?: boolean): void;
|
package/core/src/utils/dom.js
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
import { Store } from 'le5le-store';
|
2
|
-
import { Lock } from '
|
3
|
-
import {commonStore} from '../store';
|
2
|
+
import { Lock } from 'dcim-topology/core/src/models/status'
|
4
3
|
export let DomElements = {};
|
5
4
|
export function createChildrenDivByElementId(node, data) {
|
6
|
-
if(!data) data = commonStore[node.TID].data;
|
7
5
|
if (!DomElements[node.id]) {
|
8
6
|
DomElements[node.id] = document.getElementById(node.id);
|
9
7
|
if (DomElements[node.id]) {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { ptInPolyXY } from './math';
|
2
2
|
import { moveDataType, downDataType } from './construction'
|
3
|
-
import { Node } from '../models'
|
4
3
|
// 执行window函数
|
5
4
|
export function omouseEventPrototDoWindowFn (eventNode, node) {
|
6
5
|
|
@@ -19,16 +18,8 @@ export function mousMoveFun(type, pos, data) {
|
|
19
18
|
|
20
19
|
for (var _i = 0, _a = data; _i < _a.length; _i++) {
|
21
20
|
var item = _a[_i];
|
22
|
-
|
23
|
-
|
24
|
-
if(item.name === 'arbitraryGraph') {
|
25
|
-
// 任意多边形通过点获取区域
|
26
|
-
isInPointNode = ptInPolyXY(pos, item.rotatedAnchors);
|
27
|
-
}else {
|
28
|
-
if(!(item instanceof Node)) item = new Node(item);
|
29
|
-
isInPointNode = item.hit(pos);
|
30
|
-
}
|
31
|
-
if(isInPointNode) {
|
21
|
+
const isPoint = ptInPolyXY(pos, item.rotatedAnchors);
|
22
|
+
if(isPoint) {
|
32
23
|
params.hoverNode = item;
|
33
24
|
params.order = _i;
|
34
25
|
}
|
@@ -52,7 +43,7 @@ export function mousDownFun(type, eventNode) {
|
|
52
43
|
if(action === 3) {
|
53
44
|
params.eventType = downDataType.Window; // 打开会话窗口
|
54
45
|
}else if(action === 7){
|
55
|
-
params.eventType = downDataType.Showhide; //
|
46
|
+
params.eventType = downDataType.Showhide; // 链接跳转
|
56
47
|
params.value = eventNode.value;
|
57
48
|
}else if(action === 8){
|
58
49
|
params.eventType = downDataType.Tabswitch; // Tab切换
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowCommentAnchors(node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowComment(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowDataAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function flowDataAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 14, node.rect.y + node.rect.height / 2, Direction.Left));
|
4
4
|
node.anchors.push(new Point(node.rect.x + (node.rect.width * 4) / 7, node.rect.y, Direction.Up));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowData(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowDb(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowDisplayAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function flowDisplayAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
|
4
4
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowDisplay(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowDocumentAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function flowDocumentAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
|
4
4
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowDocument(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowExternStorageAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function flowExternStorageAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x, node.rect.y + node.rect.height / 2, Direction.Left));
|
4
4
|
node.anchors.push(new Point(node.rect.x + (node.rect.width * 8) / 15, node.rect.y, Direction.Up));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowExternStorage(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowInternalStorage(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowManuallyAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function flowManuallyAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x, node.rect.y + (node.rect.height * 5) / 8, Direction.Left));
|
4
4
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height / 8, Direction.Up));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowManually(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowParallelAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function flowParallelAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
|
4
4
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowParallel(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowQueue(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { registerNode } from '
|
1
|
+
import { registerNode } from 'dcim-topology/core';
|
2
2
|
import { flowData, flowDataAnchors, flowDataIconRect, flowDataTextRect } from './data';
|
3
3
|
import { flowSubprocess, flowSubprocessIconRect, flowSubprocessTextRect } from './subprocess';
|
4
4
|
import { flowDb, flowDbIconRect, flowDbTextRect } from './db';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function flowSubprocess(ctx: CanvasRenderingContext2D, node: Node): void;
|
package/layout/src/align.d.ts
CHANGED
package/layout/src/align.js
CHANGED
package/layout/src/layout.d.ts
CHANGED
package/layout/src/layout.js
CHANGED
package/package.json
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function sequenceFocusAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function sequenceFocusAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
|
4
4
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.ey, Direction.Bottom));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function sequenceFocus(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function lifelineAnchors(node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Point, Direction } from '
|
1
|
+
import { Point, Direction } from 'dcim-topology/core';
|
2
2
|
export function lifelineAnchors(node) {
|
3
3
|
node.anchors.push(new Point(node.rect.x, node.rect.y + 25, Direction.Left));
|
4
4
|
node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { Node } from '
|
1
|
+
import { Node } from 'dcim-topology/core';
|
2
2
|
export declare function lifeline(ctx: CanvasRenderingContext2D, node: Node): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { registerNode } from '
|
1
|
+
import { registerNode } from 'dcim-topology/core';
|
2
2
|
import { lifeline, lifelineAnchors, lifelineIconRect, lifelineTextRect } from './lifeline';
|
3
3
|
import { sequenceFocus, sequenceFocusAnchors, sequenceFocusIconRect, sequenceFocusTextRect } from './focus';
|
4
4
|
export function register() {
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { Pen } from '../models';
|
2
|
-
// @ts-ignore
|
3
|
-
export const commonStore: {
|
4
|
-
canvasDraws: {
|
5
|
-
[key: string]: (ctx: CanvasRenderingContext2D, pen: Pen) => void;
|
6
|
-
};
|
7
|
-
anchors: { [key: string]: (pen: Pen) => void };
|
8
|
-
htmlElements: { [key: string]: HTMLDivElement }; // html元素
|
9
|
-
};
|