@krainovsd/graph 0.10.0-rc2 → 0.10.0-rc3
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/lib/cjs/index.cjs
CHANGED
|
@@ -2188,10 +2188,14 @@ function getDrawNode(nodeRenders, textRenders, state) {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
if (nodeOptions.nodeDraw && nodeOptions.textDraw) {
|
|
2190
2190
|
nodeRenders.push(() => {
|
|
2191
|
-
nodeOptions
|
|
2191
|
+
if (nodeOptions.nodeDraw) {
|
|
2192
|
+
nodeOptions.nodeDraw.bind(this)(node, nodeOptions);
|
|
2193
|
+
}
|
|
2192
2194
|
});
|
|
2193
2195
|
textRenders.push(() => {
|
|
2194
|
-
nodeOptions
|
|
2196
|
+
if (nodeOptions.textDraw) {
|
|
2197
|
+
nodeOptions.textDraw.bind(this)(node, nodeOptions);
|
|
2198
|
+
}
|
|
2195
2199
|
});
|
|
2196
2200
|
return;
|
|
2197
2201
|
}
|
|
@@ -2447,7 +2451,7 @@ function getDrawNode(nodeRenders, textRenders, state) {
|
|
|
2447
2451
|
});
|
|
2448
2452
|
if (nodeOptions.nodeExtraDraw) {
|
|
2449
2453
|
nodeRenders.push(() => {
|
|
2450
|
-
nodeOptions?.nodeExtraDraw?.(node, {
|
|
2454
|
+
nodeOptions?.nodeExtraDraw?.bind?.(this)?.(node, {
|
|
2451
2455
|
...nodeOptions,
|
|
2452
2456
|
radius,
|
|
2453
2457
|
alpha,
|
|
@@ -2458,14 +2462,14 @@ function getDrawNode(nodeRenders, textRenders, state) {
|
|
|
2458
2462
|
textShiftY,
|
|
2459
2463
|
textWeight,
|
|
2460
2464
|
textWidth,
|
|
2461
|
-
}
|
|
2465
|
+
});
|
|
2462
2466
|
});
|
|
2463
2467
|
}
|
|
2464
2468
|
/** Text draw */
|
|
2465
2469
|
if (nodeOptions.textVisible && nodeOptions.text && nodeOptions.shape !== "text") {
|
|
2466
2470
|
textRenders.push(() => {
|
|
2467
2471
|
if (nodeOptions.textDraw) {
|
|
2468
|
-
nodeOptions.textDraw(node, {
|
|
2472
|
+
nodeOptions.textDraw.bind(this)(node, {
|
|
2469
2473
|
...nodeOptions,
|
|
2470
2474
|
radius,
|
|
2471
2475
|
alpha,
|
|
@@ -2476,7 +2480,7 @@ function getDrawNode(nodeRenders, textRenders, state) {
|
|
|
2476
2480
|
textShiftY,
|
|
2477
2481
|
textWeight,
|
|
2478
2482
|
textWidth,
|
|
2479
|
-
}
|
|
2483
|
+
});
|
|
2480
2484
|
return;
|
|
2481
2485
|
}
|
|
2482
2486
|
if (!this.context || !node.x || !node.y || !nodeOptions.text)
|
|
@@ -2507,7 +2511,7 @@ function getDrawNode(nodeRenders, textRenders, state) {
|
|
|
2507
2511
|
textGap: nodeOptions.textGap,
|
|
2508
2512
|
});
|
|
2509
2513
|
if (nodeOptions.textExtraDraw) {
|
|
2510
|
-
nodeOptions.textExtraDraw(node, {
|
|
2514
|
+
nodeOptions.textExtraDraw.bind(this)(node, {
|
|
2511
2515
|
...nodeOptions,
|
|
2512
2516
|
radius,
|
|
2513
2517
|
alpha,
|
|
@@ -2518,7 +2522,7 @@ function getDrawNode(nodeRenders, textRenders, state) {
|
|
|
2518
2522
|
textShiftY,
|
|
2519
2523
|
textWeight,
|
|
2520
2524
|
textWidth,
|
|
2521
|
-
}
|
|
2525
|
+
});
|
|
2522
2526
|
}
|
|
2523
2527
|
});
|
|
2524
2528
|
}
|