@krainovsd/graph 0.11.0-beta.2 → 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 -0
- 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/extract-link-point-ids.js +8 -0
- package/lib/esm/module/GraphCanvas/lib/utils/extract-link-point-ids.js.map +1 -0
- package/lib/index.d.ts +6 -1
- package/package.json +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -1118,6 +1118,12 @@ function linkFade(opts) {
|
|
|
1118
1118
|
return { alpha, arrowAlpha };
|
|
1119
1119
|
}
|
|
1120
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
|
+
|
|
1121
1127
|
function initArea() {
|
|
1122
1128
|
if (!this.area || !this.context || !this.container) {
|
|
1123
1129
|
this.container = d3Selection.create("div")
|
|
@@ -3851,6 +3857,7 @@ exports.colorGetter = colorGetter;
|
|
|
3851
3857
|
exports.colorToRgb = colorToRgb;
|
|
3852
3858
|
exports.dragPlaceCoefficientGetter = dragPlaceCoefficientGetter;
|
|
3853
3859
|
exports.drawText = drawText;
|
|
3860
|
+
exports.extractLinkPointIds = extractLinkPointIds;
|
|
3854
3861
|
exports.extractRgb = extractRgb;
|
|
3855
3862
|
exports.fadeRgb = fadeRgb;
|
|
3856
3863
|
exports.forceSettingsGetter = forceSettingsGetter;
|