dcim-topology2d 2.2.3 → 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 +78 -86
- 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 +18 -2
- package/core/src/activeLayer.d.ts +10 -2
- package/core/src/activeLayer.js +62 -57
- 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 +68 -69
- package/core/src/canvas.d.ts +6 -1
- package/core/src/canvas.js +21 -22
- package/core/src/common.d.ts +7 -7
- package/core/src/common.js +698 -397
- package/core/src/core.d.ts +4 -5
- package/core/src/core.js +385 -536
- 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 +100 -89
- 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 -65
- package/core/src/middles/index.d.ts +2 -1
- package/core/src/middles/index.js +2 -4
- 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.js +15 -54
- 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/line.js +7 -7
- package/core/src/models/node.d.ts +0 -10
- package/core/src/models/node.js +101 -155
- package/core/src/models/pen.js +68 -37
- 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 +24 -26
- 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 -2
- package/core/src/preview.js +54 -181
- 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 -36
- package/core/src/utils/construction.js +1 -29
- package/core/src/utils/conversion.d.ts +0 -15
- package/core/src/utils/conversion.js +0 -319
- 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/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 -8
- package/chart-diagram/src/utils/changeOptions.js +0 -273
- package/chart-diagram/src/utils/conversion.d.ts +0 -19
- package/chart-diagram/src/utils/conversion.js +0 -601
- 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 -206
- package/chart-diagram/src/utils/index.d.ts +0 -5
- package/chart-diagram/src/utils/index.js +0 -5
- package/chart-diagram/src/utils/render.d.ts +0 -8
- package/chart-diagram/src/utils/render.js +0 -223
- package/chart-diagram/src/utils/surfaceParametricConversion.d.ts +0 -3
- package/chart-diagram/src/utils/surfaceParametricConversion.js +0 -252
- package/core/src/element/common.d.ts +0 -6
- package/core/src/element/common.js +0 -62
- package/core/src/element/datePicker.d.ts +0 -3
- package/core/src/element/datePicker.js +0 -44
- 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 -5
- package/core/src/element/index.js +0 -6
- package/core/src/element/select.d.ts +0 -11
- package/core/src/element/select.js +0 -273
- package/core/src/element/tab.d.ts +0 -1
- package/core/src/element/tab.js +0 -20
- package/core/src/element/time.d.ts +0 -3
- package/core/src/element/time.js +0 -44
- 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/formDatePicker.d.ts +0 -2
- package/core/src/middles/nodes/formDatePicker.js +0 -108
- package/core/src/middles/nodes/formoverflow.js +0 -62
- package/core/src/middles/nodes/formselect.d.ts +0 -2
- package/core/src/middles/nodes/formselect.js +0 -111
- 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 -52
- package/core/src/middles/nodes/index.js +0 -54
- package/core/src/middles/nodes/progress.d.ts +0 -2
- package/core/src/middles/nodes/progress.js +0 -63
- package/core/src/middles/nodes/progress.js.map +0 -1
- package/core/src/middles/nodes/switchs.d.ts +0 -2
- package/core/src/middles/nodes/switchs.js +0 -46
- package/core/src/middles/nodes/time.d.ts +0 -2
- package/core/src/middles/nodes/time.js +0 -98
- 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 -205
- package/core/src/store/data.js +0 -198
- 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 -7
- package/core/src/utils/assignment.js +0 -229
- package/core/src/utils/params.d.ts +0 -3
- package/core/src/utils/params.js +0 -136
- 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 -2
- package/store/clear.js +0 -14
- package/store/default.js +0 -22
- package/store/index.js +0 -3
- package/style/common.css +0 -15
- package/style/datePicker.css +0 -44
- package/style/editor.css +0 -16
- package/style/index.css +0 -5
- package/style/select.css +0 -143
- /package/myShape-diagram/{index.d.ts → myShape.ts} +0 -0
|
@@ -1,62 +1,23 @@
|
|
|
1
1
|
export function rectangle(ctx, node) {
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var w = node.rect.width > node.rect.height ? node.rect.height : node.rect.width;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (node.borderRadiusTopLeft < 1) {
|
|
13
|
-
|
|
14
|
-
topLeftR = w * node.borderRadiusTopLeft;
|
|
15
|
-
|
|
2
|
+
var wr = node.borderRadius;
|
|
3
|
+
var hr = node.borderRadius;
|
|
4
|
+
if (node.borderRadius < 1) {
|
|
5
|
+
wr = node.rect.width * node.borderRadius;
|
|
6
|
+
hr = node.rect.height * node.borderRadius;
|
|
16
7
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
var r = wr < hr ? wr : hr;
|
|
9
|
+
if (node.rect.width < 2 * r) {
|
|
10
|
+
r = node.rect.width / 2;
|
|
21
11
|
}
|
|
22
|
-
if (node.
|
|
23
|
-
|
|
24
|
-
bottomLeftR = w * node.borderRadiusBottomLeft;
|
|
25
|
-
|
|
12
|
+
if (node.rect.height < 2 * r) {
|
|
13
|
+
r = node.rect.height / 2;
|
|
26
14
|
}
|
|
27
|
-
if (node.borderRadiusBottomRight < 1) {
|
|
28
|
-
|
|
29
|
-
bottomRightR = w * node.borderRadiusBottomRight;
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
var tlr = topLeftR;
|
|
34
|
-
if (w < 2 * tlr) {
|
|
35
|
-
tlr = w / 2
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
var trr = topRightR;
|
|
39
|
-
if (w < 2 * trr) {
|
|
40
|
-
trr = w / 2
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
var blr = bottomLeftR;
|
|
44
|
-
if (w < 2 * blr) {
|
|
45
|
-
blr = w / 2
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var brr = bottomRightR;
|
|
49
|
-
if (w < 2 * brr) {
|
|
50
|
-
brr = w / 2
|
|
51
|
-
}
|
|
52
|
-
|
|
53
15
|
ctx.beginPath();
|
|
54
|
-
|
|
55
|
-
ctx.
|
|
56
|
-
ctx.arcTo(node.rect.x + node.rect.width, node.rect.y
|
|
57
|
-
ctx.arcTo(node.rect.x
|
|
58
|
-
ctx.arcTo(node.rect.x, node.rect.y
|
|
59
|
-
ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, tlr);
|
|
16
|
+
ctx.moveTo(node.rect.x + r, node.rect.y);
|
|
17
|
+
ctx.arcTo(node.rect.x + node.rect.width, node.rect.y, node.rect.x + node.rect.width, node.rect.y + node.rect.height, r);
|
|
18
|
+
ctx.arcTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height, node.rect.x, node.rect.y + node.rect.height, r);
|
|
19
|
+
ctx.arcTo(node.rect.x, node.rect.y + node.rect.height, node.rect.x, node.rect.y, r);
|
|
20
|
+
ctx.arcTo(node.rect.x, node.rect.y, node.rect.x + node.rect.width, node.rect.y, r);
|
|
60
21
|
ctx.closePath();
|
|
61
22
|
(node.fillStyle || node.bkType) && ctx.fill();
|
|
62
23
|
ctx.stroke();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Rect } from '../../models';
|
|
1
|
+
import { Rect } from '../../models/rect';
|
|
2
2
|
export function rectangleIconRect(node) {
|
|
3
3
|
node.iconRect = new Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
|
|
4
4
|
node.fullIconRect = new Rect(node.rect.x + node.paddingLeftNum, node.rect.y + node.paddingTopNum, node.rect.width - node.paddingLeftNum - node.paddingRightNum, node.rect.height - node.paddingTopNum - node.paddingBottomNum);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Pen } from './pen';
|
|
2
|
+
import { Lock } from './status';
|
|
3
|
+
export declare class TopologyData {
|
|
4
|
+
pens: Pen[];
|
|
5
|
+
lineName: string;
|
|
6
|
+
fromArrowType: string;
|
|
7
|
+
toArrowType: string;
|
|
8
|
+
scale: number;
|
|
9
|
+
locked: Lock;
|
|
10
|
+
bkImage: string;
|
|
11
|
+
bkColor: string;
|
|
12
|
+
grid?: boolean;
|
|
13
|
+
websocket?: string;
|
|
14
|
+
mqttUrl?: string;
|
|
15
|
+
mqttOptions?: {
|
|
16
|
+
clientId?: string;
|
|
17
|
+
username?: string;
|
|
18
|
+
password?: string;
|
|
19
|
+
};
|
|
20
|
+
mqttTopics?: string;
|
|
21
|
+
manualCps?: boolean;
|
|
22
|
+
dataConstruct?: any;
|
|
23
|
+
data?: any;
|
|
24
|
+
bkImageRect?: any;
|
|
25
|
+
constructor(json?: any);
|
|
26
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Node } from './node';
|
|
2
|
+
import { Line } from './line';
|
|
3
|
+
import { Lock } from './status';
|
|
4
|
+
import { s8 } from '../utils';
|
|
5
|
+
var TopologyData = /** @class */ (function () {
|
|
6
|
+
function TopologyData(json) {
|
|
7
|
+
this.pens = [];
|
|
8
|
+
this.lineName = 'curve';
|
|
9
|
+
this.fromArrowType = '';
|
|
10
|
+
this.toArrowType = 'triangleSolid';
|
|
11
|
+
this.scale = 1;
|
|
12
|
+
this.locked = Lock.None;
|
|
13
|
+
this.bkImageRect = null;
|
|
14
|
+
this.mqttOptions = {
|
|
15
|
+
clientId: s8()
|
|
16
|
+
};
|
|
17
|
+
this.dataConstruct = {};
|
|
18
|
+
if (json) {
|
|
19
|
+
this.pens = [];
|
|
20
|
+
json.dataConstruct = {};
|
|
21
|
+
for (var _i = 0, _a = json.pens; _i < _a.length; _i++) {
|
|
22
|
+
var item = _a[_i];
|
|
23
|
+
if (item.from) {
|
|
24
|
+
this.pens.push(new Line(item));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
if(item.name === 'formTable') {
|
|
28
|
+
json.dataConstruct[item.id] = {
|
|
29
|
+
id: item.id,
|
|
30
|
+
name: 'table'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
this.pens.push(new Node(item));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
this.lineName = json.lineName || 'curve';
|
|
37
|
+
this.fromArrowType = json.fromArrowType || '';
|
|
38
|
+
this.toArrowType = json.toArrowType || 'triangleSolid';
|
|
39
|
+
this.scale = json.scale || 1;
|
|
40
|
+
this.locked = json.locked || Lock.None;
|
|
41
|
+
this.bkImage = json.bkImage;
|
|
42
|
+
this.bkColor = json.bkColor;
|
|
43
|
+
this.grid = json.grid;
|
|
44
|
+
this.manualCps = json.manualCps;
|
|
45
|
+
this.websocket = json.websocket;
|
|
46
|
+
this.mqttUrl = json.mqttUrl;
|
|
47
|
+
this.bkImageRect = json.bkImageRect;
|
|
48
|
+
if (json.mqttOptions) {
|
|
49
|
+
var opts = '';
|
|
50
|
+
if (typeof json.mqttOptions === 'object') {
|
|
51
|
+
opts = JSON.stringify(json.mqttOptions);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
opts = json.mqttOptions + '';
|
|
55
|
+
}
|
|
56
|
+
this.mqttOptions = JSON.parse(opts);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.mqttOptions = { clientId: s8() };
|
|
60
|
+
}
|
|
61
|
+
this.dataConstruct = json.dataConstruct ? json.dataConstruct : {};
|
|
62
|
+
this.mqttTopics = json.mqttTopics;
|
|
63
|
+
if (typeof json.data === 'object') {
|
|
64
|
+
this.data = JSON.parse(JSON.stringify(json.data));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.data = json.data || '';
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (!this.mqttOptions) {
|
|
71
|
+
this.mqttOptions = { clientId: s8() };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return TopologyData;
|
|
75
|
+
}());
|
|
76
|
+
export { TopologyData };
|
|
77
|
+
//# sourceMappingURL=data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../packages/core/src/models/data.ts"],"names":[],"mappings":"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"}
|
package/core/src/models/index.js
CHANGED
package/core/src/models/line.js
CHANGED
|
@@ -417,19 +417,19 @@ var Line = /** @class */ (function (_super) {
|
|
|
417
417
|
}
|
|
418
418
|
Store.set(this.generateStoreKey('pts-') + this.id, null);
|
|
419
419
|
};
|
|
420
|
-
Line.prototype.scale = function (scale, center
|
|
421
|
-
this.from.x = center.x - (center.x - this.from.x) *
|
|
422
|
-
this.from.y = center.y - (center.y - this.from.y) *
|
|
423
|
-
this.to.x = center.x - (center.x - this.to.x) *
|
|
424
|
-
this.to.y = center.y - (center.y - this.to.y) *
|
|
420
|
+
Line.prototype.scale = function (scale, center) {
|
|
421
|
+
this.from.x = center.x - (center.x - this.from.x) * scale;
|
|
422
|
+
this.from.y = center.y - (center.y - this.from.y) * scale;
|
|
423
|
+
this.to.x = center.x - (center.x - this.to.x) * scale;
|
|
424
|
+
this.to.y = center.y - (center.y - this.to.y) * scale;
|
|
425
425
|
if (this.text && this.font && this.font.fontSize) {
|
|
426
426
|
this.font.fontSize *= scale;
|
|
427
427
|
this.textRect = null;
|
|
428
428
|
}
|
|
429
429
|
for (var _i = 0, _a = this.controlPoints; _i < _a.length; _i++) {
|
|
430
430
|
var pt = _a[_i];
|
|
431
|
-
pt.x = center.x - (center.x - pt.x) *
|
|
432
|
-
pt.y = center.y - (center.y - pt.y) *
|
|
431
|
+
pt.x = center.x - (center.x - pt.x) * scale;
|
|
432
|
+
pt.y = center.y - (center.y - pt.y) * scale;
|
|
433
433
|
}
|
|
434
434
|
Store.set(this.generateStoreKey('pts-') + this.id, null);
|
|
435
435
|
};
|
|
@@ -7,12 +7,6 @@ export declare const images: {
|
|
|
7
7
|
cnt: number;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export declare const defaultImages: {
|
|
11
|
-
[key: string]: {
|
|
12
|
-
img: string;
|
|
13
|
-
status: number;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
10
|
export declare class Node extends Pen {
|
|
17
11
|
is3D: boolean;
|
|
18
12
|
z: number;
|
|
@@ -58,10 +52,6 @@ export declare class Node extends Pen {
|
|
|
58
52
|
linear: boolean;
|
|
59
53
|
state: Node;
|
|
60
54
|
}[];
|
|
61
|
-
formData: {
|
|
62
|
-
bindBlockId: string;
|
|
63
|
-
theme: number;
|
|
64
|
-
};
|
|
65
55
|
animateAlone: boolean;
|
|
66
56
|
gif: boolean;
|
|
67
57
|
video: string;
|