@visualli/react 0.1.3 → 0.1.5
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.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/KonvaEdge.tsx +6 -2
package/dist/index.js
CHANGED
|
@@ -1233,11 +1233,13 @@ function getEllipseIntersection(cx, cy, rx, ry, angle) {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
var EDGE_SPACING = 25;
|
|
1235
1235
|
var STROKE_COLOR = "#000000";
|
|
1236
|
+
var STROKE_COLOR_DARK = "#ffffff";
|
|
1236
1237
|
var STROKE_WIDTH = 2.5;
|
|
1237
1238
|
var KonvaEdge = memo(function KonvaEdge2({
|
|
1238
1239
|
sourceNode: from,
|
|
1239
1240
|
targetNode: to,
|
|
1240
1241
|
connection,
|
|
1242
|
+
isDark = false,
|
|
1241
1243
|
zoomLevel = 1
|
|
1242
1244
|
}) {
|
|
1243
1245
|
const label = connection?.label;
|
|
@@ -1356,12 +1358,13 @@ var KonvaEdge = memo(function KonvaEdge2({
|
|
|
1356
1358
|
}
|
|
1357
1359
|
return { pathData: d, fontSize: scaledFontSize };
|
|
1358
1360
|
}, [from.x, from.y, from.width, from.branchCount, to.x, to.y, to.width, to.branchCount, label, zoomLevel]);
|
|
1361
|
+
const strokeColor = isDark ? STROKE_COLOR_DARK : STROKE_COLOR;
|
|
1359
1362
|
return /* @__PURE__ */ jsxs2(KGroup, { children: [
|
|
1360
1363
|
/* @__PURE__ */ jsx4(
|
|
1361
1364
|
KLine,
|
|
1362
1365
|
{
|
|
1363
1366
|
points,
|
|
1364
|
-
stroke:
|
|
1367
|
+
stroke: strokeColor,
|
|
1365
1368
|
strokeWidth: STROKE_WIDTH,
|
|
1366
1369
|
tension: 0,
|
|
1367
1370
|
opacity: 0.9,
|
|
@@ -1375,7 +1378,7 @@ var KonvaEdge = memo(function KonvaEdge2({
|
|
|
1375
1378
|
KLine,
|
|
1376
1379
|
{
|
|
1377
1380
|
points: arrowHeadPoints,
|
|
1378
|
-
stroke:
|
|
1381
|
+
stroke: strokeColor,
|
|
1379
1382
|
strokeWidth: STROKE_WIDTH,
|
|
1380
1383
|
lineCap: "round",
|
|
1381
1384
|
lineJoin: "round",
|