@metadev/daga 4.2.18 → 4.2.19
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/Changelog.md +5 -0
- package/index.cjs.js +7 -4
- package/index.esm.js +7 -4
- package/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -6,6 +6,11 @@ List of releases and changes.
|
|
|
6
6
|
|
|
7
7
|
## Next release Joyeuse
|
|
8
8
|
|
|
9
|
+
## v. 4.2.19
|
|
10
|
+
|
|
11
|
+
- Fix bug where diagram properties with a `null` value fail because the `clone` function fails with `null` values [#379](https://github.com/metadevpro/daga/pull/379)
|
|
12
|
+
- Fix bugs in incorrect calculation of the margin of connection labels [#382](https://github.com/metadevpro/daga/pull/382)
|
|
13
|
+
|
|
9
14
|
## v. 4.2.18
|
|
10
15
|
|
|
11
16
|
- Remove usage of `<foreignObject>` elements for diagram fields [#375](https://github.com/metadevpro/daga/pull/375)
|
package/index.cjs.js
CHANGED
|
@@ -1191,6 +1191,9 @@ const numberOfRows = s => {
|
|
|
1191
1191
|
* @private
|
|
1192
1192
|
*/
|
|
1193
1193
|
const clone = o => {
|
|
1194
|
+
if (o === null) {
|
|
1195
|
+
return o;
|
|
1196
|
+
}
|
|
1194
1197
|
if (typeof o !== 'object') {
|
|
1195
1198
|
return o;
|
|
1196
1199
|
}
|
|
@@ -9006,10 +9009,10 @@ class DiagramCanvas {
|
|
|
9006
9009
|
pathStartLabelPoint = pathNode.getPointAtLength(getLeftMargin(labelConfiguration) + boundingWidth / 2);
|
|
9007
9010
|
break;
|
|
9008
9011
|
case exports.Side.Top:
|
|
9009
|
-
pathStartLabelPoint = pathNode.getPointAtLength(getBottomMargin(labelConfiguration) +
|
|
9012
|
+
pathStartLabelPoint = pathNode.getPointAtLength(getBottomMargin(labelConfiguration) + boundingHeight / 2);
|
|
9010
9013
|
break;
|
|
9011
9014
|
case exports.Side.Bottom:
|
|
9012
|
-
pathStartLabelPoint = pathNode.getPointAtLength(getTopMargin(labelConfiguration) +
|
|
9015
|
+
pathStartLabelPoint = pathNode.getPointAtLength(getTopMargin(labelConfiguration) + boundingHeight / 2);
|
|
9013
9016
|
break;
|
|
9014
9017
|
default:
|
|
9015
9018
|
pathStartLabelPoint = pathNode.getPointAtLength(Math.max(getLeftMargin(labelConfiguration) + boundingWidth / 2, getRightMargin(labelConfiguration) + boundingWidth / 2, getTopMargin(labelConfiguration) + boundingHeight / 2, getBottomMargin(labelConfiguration) + boundingHeight / 2));
|
|
@@ -9044,10 +9047,10 @@ class DiagramCanvas {
|
|
|
9044
9047
|
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getLeftMargin(labelConfiguration) + boundingWidth / 2));
|
|
9045
9048
|
break;
|
|
9046
9049
|
case exports.Side.Top:
|
|
9047
|
-
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getBottomMargin(labelConfiguration) +
|
|
9050
|
+
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getBottomMargin(labelConfiguration) + boundingHeight / 2));
|
|
9048
9051
|
break;
|
|
9049
9052
|
case exports.Side.Bottom:
|
|
9050
|
-
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getTopMargin(labelConfiguration) +
|
|
9053
|
+
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getTopMargin(labelConfiguration) + boundingHeight / 2));
|
|
9051
9054
|
break;
|
|
9052
9055
|
default:
|
|
9053
9056
|
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - Math.max(getLeftMargin(labelConfiguration) + boundingWidth / 2, getRightMargin(labelConfiguration) + boundingWidth / 2, getTopMargin(labelConfiguration) + boundingHeight / 2, getBottomMargin(labelConfiguration) + boundingHeight / 2));
|
package/index.esm.js
CHANGED
|
@@ -1170,6 +1170,9 @@ const numberOfRows = s => {
|
|
|
1170
1170
|
* @private
|
|
1171
1171
|
*/
|
|
1172
1172
|
const clone = o => {
|
|
1173
|
+
if (o === null) {
|
|
1174
|
+
return o;
|
|
1175
|
+
}
|
|
1173
1176
|
if (typeof o !== 'object') {
|
|
1174
1177
|
return o;
|
|
1175
1178
|
}
|
|
@@ -8985,10 +8988,10 @@ class DiagramCanvas {
|
|
|
8985
8988
|
pathStartLabelPoint = pathNode.getPointAtLength(getLeftMargin(labelConfiguration) + boundingWidth / 2);
|
|
8986
8989
|
break;
|
|
8987
8990
|
case Side.Top:
|
|
8988
|
-
pathStartLabelPoint = pathNode.getPointAtLength(getBottomMargin(labelConfiguration) +
|
|
8991
|
+
pathStartLabelPoint = pathNode.getPointAtLength(getBottomMargin(labelConfiguration) + boundingHeight / 2);
|
|
8989
8992
|
break;
|
|
8990
8993
|
case Side.Bottom:
|
|
8991
|
-
pathStartLabelPoint = pathNode.getPointAtLength(getTopMargin(labelConfiguration) +
|
|
8994
|
+
pathStartLabelPoint = pathNode.getPointAtLength(getTopMargin(labelConfiguration) + boundingHeight / 2);
|
|
8992
8995
|
break;
|
|
8993
8996
|
default:
|
|
8994
8997
|
pathStartLabelPoint = pathNode.getPointAtLength(Math.max(getLeftMargin(labelConfiguration) + boundingWidth / 2, getRightMargin(labelConfiguration) + boundingWidth / 2, getTopMargin(labelConfiguration) + boundingHeight / 2, getBottomMargin(labelConfiguration) + boundingHeight / 2));
|
|
@@ -9023,10 +9026,10 @@ class DiagramCanvas {
|
|
|
9023
9026
|
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getLeftMargin(labelConfiguration) + boundingWidth / 2));
|
|
9024
9027
|
break;
|
|
9025
9028
|
case Side.Top:
|
|
9026
|
-
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getBottomMargin(labelConfiguration) +
|
|
9029
|
+
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getBottomMargin(labelConfiguration) + boundingHeight / 2));
|
|
9027
9030
|
break;
|
|
9028
9031
|
case Side.Bottom:
|
|
9029
|
-
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getTopMargin(labelConfiguration) +
|
|
9032
|
+
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - (getTopMargin(labelConfiguration) + boundingHeight / 2));
|
|
9030
9033
|
break;
|
|
9031
9034
|
default:
|
|
9032
9035
|
pathEndLabelPoint = pathNode.getPointAtLength(pathLength - Math.max(getLeftMargin(labelConfiguration) + boundingWidth / 2, getRightMargin(labelConfiguration) + boundingWidth / 2, getTopMargin(labelConfiguration) + boundingHeight / 2, getBottomMargin(labelConfiguration) + boundingHeight / 2));
|