@html-graph/html-graph 8.18.1 → 8.19.1
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/html-graph.d.ts +9 -4
- package/dist/html-graph.js +18 -5
- package/dist/html-graph.min.js +181 -174
- package/dist/html-graph.min.umd.cjs +1 -1
- package/dist/html-graph.umd.cjs +18 -5
- package/package.json +1 -1
package/dist/html-graph.umd.cjs
CHANGED
|
@@ -2624,8 +2624,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2624
2624
|
};
|
|
2625
2625
|
if (this.sourceArrow) {
|
|
2626
2626
|
const sourceOffset = {
|
|
2627
|
-
x: direction.x * this.sourceOffset,
|
|
2628
|
-
y: direction.y * this.sourceOffset
|
|
2627
|
+
x: direction.x * this.sourceOffset + from.x,
|
|
2628
|
+
y: direction.y * this.sourceOffset + from.y
|
|
2629
2629
|
};
|
|
2630
2630
|
sourceArrowPath = this.arrowRenderer({
|
|
2631
2631
|
direction,
|
|
@@ -2695,7 +2695,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2695
2695
|
// TODO: make private
|
|
2696
2696
|
/**
|
|
2697
2697
|
* @deprecated
|
|
2698
|
-
*
|
|
2698
|
+
* use shape.svg instead
|
|
2699
2699
|
*/
|
|
2700
2700
|
__publicField(this, "handle", createEdgeGroup());
|
|
2701
2701
|
__publicField(this, "onAfterRender");
|
|
@@ -3594,7 +3594,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3594
3594
|
to: params.isDirect ? targetPortId : params.staticPortId
|
|
3595
3595
|
};
|
|
3596
3596
|
};
|
|
3597
|
-
class
|
|
3597
|
+
class NearestConnectablePortDraggingPortDirectionResolver {
|
|
3598
3598
|
constructor(graph, connectionAllowedVerifier) {
|
|
3599
3599
|
this.graph = graph;
|
|
3600
3600
|
this.connectionAllowedVerifier = connectionAllowedVerifier;
|
|
@@ -5054,7 +5054,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5054
5054
|
};
|
|
5055
5055
|
const resolveDraggingPortDirectionResolver = (config, graph, connectionAllowedVerifier) => {
|
|
5056
5056
|
if (config === "closest-connectable-port") {
|
|
5057
|
-
return new
|
|
5057
|
+
return new NearestConnectablePortDraggingPortDirectionResolver(
|
|
5058
|
+
graph,
|
|
5059
|
+
connectionAllowedVerifier
|
|
5060
|
+
);
|
|
5061
|
+
}
|
|
5062
|
+
if (config === "nearest-connectable-port") {
|
|
5063
|
+
return new NearestConnectablePortDraggingPortDirectionResolver(
|
|
5058
5064
|
graph,
|
|
5059
5065
|
connectionAllowedVerifier
|
|
5060
5066
|
);
|
|
@@ -6425,6 +6431,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6425
6431
|
nodeMass: (config == null ? void 0 : config.nodeMass) ?? forceDirectedDefaults.nodeMass,
|
|
6426
6432
|
edgeEquilibriumLength: (config == null ? void 0 : config.edgeEquilibriumLength) ?? forceDirectedDefaults.edgeEquilibriumLength,
|
|
6427
6433
|
edgeStiffness: (config == null ? void 0 : config.edgeStiffness) ?? forceDirectedDefaults.edgeStiffness,
|
|
6434
|
+
// TODO: rename no `minVelocity`
|
|
6428
6435
|
convergenceVelocity: (config == null ? void 0 : config.convergenceVelocity) ?? forceDirectedDefaults.convergenceVelocity,
|
|
6429
6436
|
maxForce: (config == null ? void 0 : config.maxForce) ?? forceDirectedDefaults.maxForce,
|
|
6430
6437
|
nodeForceCoefficient: (config == null ? void 0 : config.nodeForceCoefficient) ?? forceDirectedDefaults.nodeForceCoefficient,
|
|
@@ -6454,6 +6461,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6454
6461
|
trigger: applyOn
|
|
6455
6462
|
};
|
|
6456
6463
|
}
|
|
6464
|
+
if (applyOn === "topologyChangeMicrotask") {
|
|
6465
|
+
return {
|
|
6466
|
+
type: "topologyChangeSchedule",
|
|
6467
|
+
schedule: microtaskScheduleFn
|
|
6468
|
+
};
|
|
6469
|
+
}
|
|
6457
6470
|
if ((applyOn == null ? void 0 : applyOn.type) === "topologyChangeMacrotask") {
|
|
6458
6471
|
return {
|
|
6459
6472
|
type: "topologyChangeSchedule",
|