@krainovsd/graph 0.11.0-beta.1 → 0.11.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/lib/cjs/index.cjs +7 -2
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/calculate-link-position-by-node.js +0 -1
- package/lib/esm/module/GraphCanvas/lib/utils/calculate-link-position-by-node.js.map +1 -1
- package/lib/esm/module/GraphCanvas/lib/utils/extract-link-point-ids.js +8 -0
- package/lib/esm/module/GraphCanvas/lib/utils/extract-link-point-ids.js.map +1 -0
- package/lib/esm/module/GraphCanvas/lib/utils/link-by-pointer-getter.js +0 -1
- package/lib/esm/module/GraphCanvas/lib/utils/link-by-pointer-getter.js.map +1 -1
- package/lib/index.d.ts +7 -1
- package/package.json +10 -10
package/lib/cjs/index.cjs
CHANGED
|
@@ -555,7 +555,6 @@ function nodeIterationExtractor(node, i, nodes, state, option, optionConstantGet
|
|
|
555
555
|
return customOptions;
|
|
556
556
|
}
|
|
557
557
|
|
|
558
|
-
/* eslint-disable id-length */
|
|
559
558
|
function calculateLinkPositionByNode(link, arrowSize = 0) {
|
|
560
559
|
const source = link.source;
|
|
561
560
|
const target = link.target;
|
|
@@ -905,7 +904,6 @@ function getParticlePosition(opts) {
|
|
|
905
904
|
}
|
|
906
905
|
}
|
|
907
906
|
|
|
908
|
-
/* eslint-disable id-length */
|
|
909
907
|
function linkByPointerGetter({ areaRect, areaTransform, mouseEvent, links, linkHoverExtraZone, }) {
|
|
910
908
|
if (!areaRect)
|
|
911
909
|
return undefined;
|
|
@@ -1120,6 +1118,12 @@ function linkFade(opts) {
|
|
|
1120
1118
|
return { alpha, arrowAlpha };
|
|
1121
1119
|
}
|
|
1122
1120
|
|
|
1121
|
+
function extractLinkPointIds(link) {
|
|
1122
|
+
const sourceId = typeof link.source === "object" ? link.source.id : link.source;
|
|
1123
|
+
const targetId = typeof link.target === "object" ? link.target.id : link.target;
|
|
1124
|
+
return { sourceId, targetId };
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1123
1127
|
function initArea() {
|
|
1124
1128
|
if (!this.area || !this.context || !this.container) {
|
|
1125
1129
|
this.container = d3Selection.create("div")
|
|
@@ -3853,6 +3857,7 @@ exports.colorGetter = colorGetter;
|
|
|
3853
3857
|
exports.colorToRgb = colorToRgb;
|
|
3854
3858
|
exports.dragPlaceCoefficientGetter = dragPlaceCoefficientGetter;
|
|
3855
3859
|
exports.drawText = drawText;
|
|
3860
|
+
exports.extractLinkPointIds = extractLinkPointIds;
|
|
3856
3861
|
exports.extractRgb = extractRgb;
|
|
3857
3862
|
exports.fadeRgb = fadeRgb;
|
|
3858
3863
|
exports.forceSettingsGetter = forceSettingsGetter;
|