@markdy/core 0.8.22 → 0.8.24
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/index.js +7 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -493,6 +493,7 @@ var SAFE = 44;
|
|
|
493
493
|
var TITLE_BAND = 76;
|
|
494
494
|
var NODE_W = 168;
|
|
495
495
|
var NODE_H = 72;
|
|
496
|
+
var VENN_NODE_SIZE = 136;
|
|
496
497
|
var GROUP_PAD = 24;
|
|
497
498
|
var DEFAULTS = {
|
|
498
499
|
show: 0.35,
|
|
@@ -1117,12 +1118,12 @@ function layoutVenn(ast) {
|
|
|
1117
1118
|
const decl = ast.nodes[id];
|
|
1118
1119
|
let x, y;
|
|
1119
1120
|
if (N === 2) {
|
|
1120
|
-
x = centerX + (idx === 0 ? -radius * 0.55 : radius * 0.55) -
|
|
1121
|
-
y = centerY -
|
|
1121
|
+
x = centerX + (idx === 0 ? -radius * 0.55 : radius * 0.55) - VENN_NODE_SIZE / 2;
|
|
1122
|
+
y = centerY - VENN_NODE_SIZE / 2;
|
|
1122
1123
|
} else {
|
|
1123
1124
|
const angle = -Math.PI / 2 + idx * 2 * Math.PI / N;
|
|
1124
|
-
x = centerX + radius * 0.6 * Math.cos(angle) -
|
|
1125
|
-
y = centerY + radius * 0.6 * Math.sin(angle) -
|
|
1125
|
+
x = centerX + radius * 0.6 * Math.cos(angle) - VENN_NODE_SIZE / 2;
|
|
1126
|
+
y = centerY + radius * 0.6 * Math.sin(angle) - VENN_NODE_SIZE / 2;
|
|
1126
1127
|
}
|
|
1127
1128
|
const focal = decl.props.focal === true || decl.props.accent === true;
|
|
1128
1129
|
nodes.push({
|
|
@@ -1132,8 +1133,8 @@ function layoutVenn(ast) {
|
|
|
1132
1133
|
label: decl.label,
|
|
1133
1134
|
x: snapGrid(x),
|
|
1134
1135
|
y: snapGrid(y),
|
|
1135
|
-
width:
|
|
1136
|
-
height:
|
|
1136
|
+
width: VENN_NODE_SIZE,
|
|
1137
|
+
height: VENN_NODE_SIZE,
|
|
1137
1138
|
style: decl.style ? ast.styles[decl.style]?.props : void 0,
|
|
1138
1139
|
props: decl.props,
|
|
1139
1140
|
opacity: 0,
|
package/package.json
CHANGED