dcim-topology2d 2.0.8 → 3.0.2
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/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/index.d.ts +1 -3
- package/chart-diagram/index.js +1 -2
- package/chart-diagram/src/echarts/index.d.ts +2 -1
- package/chart-diagram/src/echarts/index.js +104 -109
- package/chart-diagram/src/register.js +8 -9
- 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 -2
- package/core/index.js +0 -2
- package/core/src/activeLayer.d.ts +10 -2
- package/core/src/activeLayer.js +47 -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 -43
- package/core/src/canvas.d.ts +6 -1
- package/core/src/canvas.js +21 -22
- package/core/src/common.d.ts +7 -6
- package/core/src/common.js +673 -332
- package/core/src/core.d.ts +4 -3
- package/core/src/core.js +367 -466
- package/core/src/divLayer.d.ts +36 -2
- package/core/src/divLayer.js +305 -33
- package/core/src/healps/changeData.d.ts +2 -1
- package/core/src/healps/changeData.js +66 -32
- package/core/src/hoverLayer.d.ts +9 -2
- package/core/src/hoverLayer.js +34 -31
- package/core/src/middles/default.d.ts +3 -1
- package/core/src/middles/default.js +51 -53
- package/core/src/middles/index.js +2 -3
- package/core/src/middles/nodes/arbitrarygraph.js +9 -11
- package/core/src/middles/nodes/pentagon.rect.js +1 -1
- package/core/src/middles/nodes/rectangle.rect.js +1 -1
- 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.d.ts +0 -10
- package/core/src/models/node.js +36 -69
- package/core/src/models/pen.js +59 -19
- package/core/src/models/rect.js +2 -2
- 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.d.ts +1 -3
- package/core/src/options.js +0 -2
- package/core/src/poll.js +39 -0
- package/core/src/preview.d.ts +13 -1
- package/core/src/preview.js +43 -111
- package/core/src/renderLayer.d.ts +9 -11
- package/core/src/renderLayer.js +61 -60
- 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/construction.d.ts +3 -12
- package/core/src/utils/construction.js +1 -8
- package/core/src/utils/conversion.d.ts +0 -11
- package/core/src/utils/conversion.js +0 -168
- package/core/src/utils/dom.d.ts +8 -0
- package/core/src/utils/dom.js +67 -0
- package/core/src/utils/dom.js.map +1 -0
- package/core/src/utils/index.d.ts +1 -2
- package/core/src/utils/index.js +1 -2
- package/core/src/utils/math.d.ts +0 -1
- package/core/src/utils/math.js +0 -3
- package/core/src/utils/onmousevent.d.ts +0 -3
- package/core/src/utils/onmousevent.js +10 -42
- 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/{index.js → myShape.js} +1 -4
- 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/chart-diagram/src/utils/changeOptions.d.ts +0 -7
- package/chart-diagram/src/utils/changeOptions.js +0 -261
- package/chart-diagram/src/utils/conversion.d.ts +0 -19
- package/chart-diagram/src/utils/conversion.js +0 -432
- package/chart-diagram/src/utils/drawGraphic.d.ts +0 -3
- package/chart-diagram/src/utils/drawGraphic.js +0 -97
- package/chart-diagram/src/utils/formatter.d.ts +0 -1
- package/chart-diagram/src/utils/formatter.js +0 -170
- package/chart-diagram/src/utils/index.d.ts +0 -4
- package/chart-diagram/src/utils/index.js +0 -4
- package/chart-diagram/src/utils/render.d.ts +0 -8
- package/chart-diagram/src/utils/render.js +0 -228
- package/core/src/element/common.d.ts +0 -5
- package/core/src/element/common.js +0 -54
- package/core/src/element/iframe.d.ts +0 -3
- package/core/src/element/iframe.js +0 -12
- package/core/src/element/index.d.ts +0 -4
- package/core/src/element/index.js +0 -4
- package/core/src/element/select.d.ts +0 -11
- package/core/src/element/select.js +0 -263
- package/core/src/element/tab.d.ts +0 -1
- package/core/src/element/tab.js +0 -23
- package/core/src/middles/arrows/index.d.ts +0 -4
- package/core/src/middles/arrows/index.js +0 -5
- package/core/src/middles/lines/index.d.ts +0 -4
- package/core/src/middles/lines/index.js +0 -5
- package/core/src/middles/nodes/formoverflow.js +0 -61
- package/core/src/middles/nodes/formselect.d.ts +0 -2
- package/core/src/middles/nodes/formselect.js +0 -95
- package/core/src/middles/nodes/iframe.d.ts +0 -2
- package/core/src/middles/nodes/iframe.js +0 -29
- package/core/src/middles/nodes/index.d.ts +0 -48
- package/core/src/middles/nodes/index.js +0 -49
- 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 -189
- package/core/src/store/data.js +0 -180
- package/core/src/store/index.d.ts +0 -2
- package/core/src/store/index.js +0 -2
- package/core/src/utils/assignment.d.ts +0 -6
- package/core/src/utils/assignment.js +0 -173
- package/core/src/utils/params.d.ts +0 -2
- package/core/src/utils/params.js +0 -60
- package/static/echartsDefaultData.js +0 -178
- package/static/element.js +0 -14
- package/static/form.js +0 -11
- package/static/index.js +0 -3
- package/store/actions.js +0 -1
- package/store/clear.js +0 -10
- package/store/index.js +0 -2
- package/style/common.css +0 -18
- package/style/editor.css +0 -13
- package/style/index.css +0 -4
- package/style/select.css +0 -143
- /package/myShape-diagram/{index.ts → myShape.ts} +0 -0
package/core/src/canvas.js
CHANGED
@@ -13,59 +13,58 @@ var __extends = (this && this.__extends) || (function () {
|
|
13
13
|
})();
|
14
14
|
import { Store } from 'le5le-store';
|
15
15
|
import { Layer } from './layer';
|
16
|
-
import { commonStore } from './store'
|
17
16
|
var Canvas = /** @class */ (function (_super) {
|
18
17
|
__extends(Canvas, _super);
|
19
|
-
function Canvas(TID) {
|
18
|
+
function Canvas(parentElem, options, TID) {
|
19
|
+
if (options === void 0) { options = {}; }
|
20
20
|
var _this = _super.call(this, TID) || this;
|
21
|
+
_this.parentElem = parentElem;
|
22
|
+
_this.options = options;
|
21
23
|
_this.canvas = document.createElement('canvas');
|
22
|
-
_this.
|
23
|
-
_this.
|
24
|
-
_this.
|
24
|
+
_this.width = parentElem.clientWidth;
|
25
|
+
_this.height = parentElem.clientHeight;
|
26
|
+
_this.data = Store.get(_this.generateStoreKey('topology-data'));
|
25
27
|
_this.canvas.style.position = 'absolute';
|
26
28
|
_this.canvas.style.left = '0';
|
27
29
|
_this.canvas.style.top = '0';
|
28
30
|
_this.canvas.style.outline = 'none';
|
29
31
|
if (!Canvas.dpiRatio) {
|
30
|
-
if (!
|
32
|
+
if (!options.extDpiRatio && options.extDpiRatio !== 0) {
|
31
33
|
if (window.devicePixelRatio > 1) {
|
32
|
-
|
34
|
+
options.extDpiRatio = 0.25;
|
33
35
|
}
|
34
36
|
else {
|
35
|
-
|
37
|
+
options.extDpiRatio = 0;
|
36
38
|
}
|
37
39
|
}
|
38
|
-
Canvas.dpiRatio = window.devicePixelRatio +
|
40
|
+
Canvas.dpiRatio = window.devicePixelRatio + options.extDpiRatio;
|
39
41
|
}
|
40
42
|
return _this;
|
41
43
|
}
|
42
44
|
Canvas.prototype.resize = function (size) {
|
43
45
|
if (size) {
|
44
|
-
this.width = size.width
|
46
|
+
this.width = size.width | 0;
|
45
47
|
this.height = size.height | 0;
|
46
48
|
}
|
47
49
|
else {
|
48
|
-
|
49
|
-
|
50
|
-
if (commonStore[TID].options.width && commonStore[TID].options.width !== 'auto') {
|
51
|
-
this.width = commonStore[TID].options.width;
|
50
|
+
if (this.options.width && this.options.width !== 'auto') {
|
51
|
+
this.width = this.options.width;
|
52
52
|
}
|
53
53
|
else {
|
54
|
-
this.width =
|
54
|
+
this.width = this.parentElem.clientWidth;
|
55
55
|
}
|
56
|
-
if (
|
57
|
-
this.height =
|
56
|
+
if (this.options.height && this.options.height !== 'auto') {
|
57
|
+
this.height = this.options.height;
|
58
58
|
}
|
59
59
|
else {
|
60
|
-
this.height =
|
60
|
+
this.height = this.parentElem.clientHeight;
|
61
61
|
}
|
62
62
|
}
|
63
63
|
this.canvas.style.width = this.width + 'px';
|
64
64
|
this.canvas.style.height = this.height + 'px';
|
65
|
-
|
66
|
-
this.canvas.
|
67
|
-
this.canvas.
|
68
|
-
this.canvas.getContext('2d').scale(dpr, dpr);
|
65
|
+
this.canvas.width = (this.width * Canvas.dpiRatio) | 0;
|
66
|
+
this.canvas.height = (this.height * Canvas.dpiRatio) | 0;
|
67
|
+
this.canvas.getContext('2d').scale(Canvas.dpiRatio, Canvas.dpiRatio);
|
69
68
|
Store.set(this.generateStoreKey('LT:size'), { width: this.canvas.width, height: this.canvas.height });
|
70
69
|
};
|
71
70
|
Canvas.prototype.render = function () {
|
package/core/src/common.d.ts
CHANGED
@@ -4,9 +4,9 @@ import { DivLayer } from './divLayer';
|
|
4
4
|
import { AnimateLayer } from './animateLayer';
|
5
5
|
import { RenderLayer } from './renderLayer';
|
6
6
|
import { Offscreen } from './offscreen';
|
7
|
-
import {Line, Node, Pen, Point, Rect} from './models';
|
7
|
+
import {Line, Node, Pen, Point, Rect, TopologyData} from './models';
|
8
8
|
import {Padding, Options} from './options';
|
9
|
-
import {
|
9
|
+
import { Socket } from './socket';
|
10
10
|
declare enum MoveInType {
|
11
11
|
None = 0,
|
12
12
|
Line = 1,
|
@@ -21,7 +21,8 @@ declare enum MoveInType {
|
|
21
21
|
}
|
22
22
|
export declare class Common {
|
23
23
|
//constructor(parent: HTMLElement, options: Options);
|
24
|
-
|
24
|
+
options: Options;
|
25
|
+
data: TopologyData;
|
25
26
|
moveInType: MoveInType;
|
26
27
|
id: String;
|
27
28
|
parentElem: HTMLElement;
|
@@ -32,6 +33,7 @@ export declare class Common {
|
|
32
33
|
input: HTMLTextAreaElement;
|
33
34
|
tipMarkdown: HTMLElement;
|
34
35
|
tipElem: HTMLElement;
|
36
|
+
socket: Socket;
|
35
37
|
private subcribe;
|
36
38
|
private subcribeRender;
|
37
39
|
private subcribeImage;
|
@@ -56,8 +58,6 @@ export declare class Common {
|
|
56
58
|
y: number;
|
57
59
|
restore?: boolean;
|
58
60
|
};
|
59
|
-
renderTimer: number;
|
60
|
-
lastRender: number;
|
61
61
|
lastTranlated: {
|
62
62
|
x: number;
|
63
63
|
y: number;
|
@@ -75,7 +75,8 @@ export declare class Common {
|
|
75
75
|
ratioCord: Object;
|
76
76
|
_emitter: Emitter;
|
77
77
|
conversionData(data?: any): void;
|
78
|
-
|
78
|
+
setSwitchTabData(node: Node | any, index: Number): void;
|
79
|
+
switchStaticsCheckType(node: Node | any): any;
|
79
80
|
canvasResize(size?: {
|
80
81
|
width: number;
|
81
82
|
height: number;
|