@wcardinal/wcardinal-ui 0.315.0 → 0.317.0
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/types/wcardinal/ui/shape/e-shape-acceptor-impl.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor.d.ts +5 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.d.ts +7 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-acceptor.d.ts +3 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge.d.ts +4 -2
- package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js +6 -2
- package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-acceptor.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.js +32 -2
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-acceptor.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js +9 -5
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +48 -10
- package/dist/wcardinal-ui.js +48 -10
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.317.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -17619,12 +17619,16 @@
|
|
|
17619
17619
|
function EShapeAcceptorImpl() {
|
|
17620
17620
|
this._edges = new Map();
|
|
17621
17621
|
}
|
|
17622
|
-
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny) {
|
|
17622
|
+
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy) {
|
|
17623
17623
|
this._edges.set(id, {
|
|
17624
17624
|
type: type,
|
|
17625
17625
|
x: x,
|
|
17626
17626
|
y: y,
|
|
17627
|
-
normal: this.toNormal(x, y, nx, ny)
|
|
17627
|
+
normal: this.toNormal(x, y, nx, ny),
|
|
17628
|
+
size: {
|
|
17629
|
+
x: sx !== null && sx !== void 0 ? sx : 0,
|
|
17630
|
+
y: sy !== null && sy !== void 0 ? sy : 0
|
|
17631
|
+
}
|
|
17628
17632
|
});
|
|
17629
17633
|
return true;
|
|
17630
17634
|
};
|
|
@@ -17748,6 +17752,8 @@
|
|
|
17748
17752
|
this._parent = parent;
|
|
17749
17753
|
this._shape = null;
|
|
17750
17754
|
this._edge = null;
|
|
17755
|
+
this._x = null;
|
|
17756
|
+
this._y = null;
|
|
17751
17757
|
}
|
|
17752
17758
|
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "shape", {
|
|
17753
17759
|
get: function () {
|
|
@@ -17769,10 +17775,30 @@
|
|
|
17769
17775
|
enumerable: false,
|
|
17770
17776
|
configurable: true
|
|
17771
17777
|
});
|
|
17778
|
+
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "x", {
|
|
17779
|
+
get: function () {
|
|
17780
|
+
return this._x;
|
|
17781
|
+
},
|
|
17782
|
+
set: function (x) {
|
|
17783
|
+
this.set(undefined, undefined, x);
|
|
17784
|
+
},
|
|
17785
|
+
enumerable: false,
|
|
17786
|
+
configurable: true
|
|
17787
|
+
});
|
|
17788
|
+
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "y", {
|
|
17789
|
+
get: function () {
|
|
17790
|
+
return this._y;
|
|
17791
|
+
},
|
|
17792
|
+
set: function (y) {
|
|
17793
|
+
this.set(undefined, undefined, undefined, y);
|
|
17794
|
+
},
|
|
17795
|
+
enumerable: false,
|
|
17796
|
+
configurable: true
|
|
17797
|
+
});
|
|
17772
17798
|
EShapeConnectorEdgeAcceptorImpl.prototype.copy = function (source) {
|
|
17773
|
-
return this.set(source.shape, source.edge);
|
|
17799
|
+
return this.set(source.shape, source.edge, source.x, source.y);
|
|
17774
17800
|
};
|
|
17775
|
-
EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge) {
|
|
17801
|
+
EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge, x, y) {
|
|
17776
17802
|
var isChanged = false;
|
|
17777
17803
|
if (shape !== undefined && this._shape !== shape) {
|
|
17778
17804
|
this._shape = shape;
|
|
@@ -17782,6 +17808,14 @@
|
|
|
17782
17808
|
this._edge = edge;
|
|
17783
17809
|
isChanged = true;
|
|
17784
17810
|
}
|
|
17811
|
+
if (x !== undefined && this._x !== x) {
|
|
17812
|
+
this._x = x;
|
|
17813
|
+
isChanged = true;
|
|
17814
|
+
}
|
|
17815
|
+
if (y !== undefined && this._y !== y) {
|
|
17816
|
+
this._y = y;
|
|
17817
|
+
isChanged = true;
|
|
17818
|
+
}
|
|
17785
17819
|
if (isChanged) {
|
|
17786
17820
|
this._parent.onAcceptorChange();
|
|
17787
17821
|
}
|
|
@@ -17914,9 +17948,9 @@
|
|
|
17914
17948
|
enumerable: false,
|
|
17915
17949
|
configurable: true
|
|
17916
17950
|
});
|
|
17917
|
-
EShapeConnectorEdgeImpl.prototype.set = function (
|
|
17951
|
+
EShapeConnectorEdgeImpl.prototype.set = function (acceptorShape, acceptorEdge, acceptorX, acceptorY, margin, x, y, nx, ny) {
|
|
17918
17952
|
this.lock();
|
|
17919
|
-
this._acceptor.set(
|
|
17953
|
+
this._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);
|
|
17920
17954
|
var local = this._local;
|
|
17921
17955
|
if (x != null && y != null) {
|
|
17922
17956
|
local.set(x, y);
|
|
@@ -17960,9 +17994,10 @@
|
|
|
17960
17994
|
var edgeId = edge != null ? manager.addResource(edge) : -1;
|
|
17961
17995
|
var local = this._local;
|
|
17962
17996
|
var normal = this._normal;
|
|
17963
|
-
return manager.addResource("[".concat(shapeUuid, ",").concat(edgeId, ",").concat(local.x, ",").concat(local.y, ",").concat(this._margin, ",").concat(normal.x, ",").concat(normal.y, "]"));
|
|
17997
|
+
return manager.addResource("[".concat(shapeUuid, ",").concat(edgeId, ",").concat(local.x, ",").concat(local.y, ",").concat(this._margin, ",").concat(normal.x, ",").concat(normal.y, ",").concat(acceptor.x, ",").concat(acceptor.y, "]"));
|
|
17964
17998
|
};
|
|
17965
17999
|
EShapeConnectorEdgeImpl.prototype.deserialize = function (resourceId, mapping, manager) {
|
|
18000
|
+
var _a, _b;
|
|
17966
18001
|
var resources = manager.resources;
|
|
17967
18002
|
if (0 <= resourceId && resourceId < resources.length) {
|
|
17968
18003
|
var parsed = manager.getExtension(resourceId);
|
|
@@ -17980,6 +18015,8 @@
|
|
|
17980
18015
|
acceptor.shape = shape;
|
|
17981
18016
|
var edgeId = parsed[1];
|
|
17982
18017
|
acceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;
|
|
18018
|
+
acceptor.x = (_a = parsed[7]) !== null && _a !== void 0 ? _a : null;
|
|
18019
|
+
acceptor.y = (_b = parsed[8]) !== null && _b !== void 0 ? _b : null;
|
|
17983
18020
|
this._local.set(parsed[2], parsed[3]);
|
|
17984
18021
|
var normalX = parsed[5];
|
|
17985
18022
|
var normalY = parsed[6];
|
|
@@ -18006,6 +18043,7 @@
|
|
|
18006
18043
|
return this;
|
|
18007
18044
|
};
|
|
18008
18045
|
EShapeConnectorEdgeImpl.prototype.doFit = function () {
|
|
18046
|
+
var _a, _b;
|
|
18009
18047
|
var localIdRequired = this._localIdRequired;
|
|
18010
18048
|
var isLocalDirty = this._localId !== localIdRequired;
|
|
18011
18049
|
var normalIdRequired = this._normalIdRequired;
|
|
@@ -18030,8 +18068,8 @@
|
|
|
18030
18068
|
if (isLocalDirty) {
|
|
18031
18069
|
var size = acceptorShape.size;
|
|
18032
18070
|
var pivot = acceptorShape.transform.pivot;
|
|
18033
|
-
var lx = pivot.x + size.x * edge.x;
|
|
18034
|
-
var ly = pivot.y + size.y * edge.y;
|
|
18071
|
+
var lx = pivot.x + size.x * ((_a = acceptor.x) !== null && _a !== void 0 ? _a : edge.x);
|
|
18072
|
+
var ly = pivot.y + size.y * ((_b = acceptor.y) !== null && _b !== void 0 ? _b : edge.y);
|
|
18035
18073
|
this._local.set(a * lx + c * ly + tx, b * lx + d * ly + ty);
|
|
18036
18074
|
}
|
|
18037
18075
|
if (isNormalDirty) {
|