@statelyai/flow 0.4.0 → 0.4.2
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/esm/index.js +3 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1279,6 +1279,7 @@ function planNodeMovement(ctx, dx, dy, options = {}) {
|
|
|
1279
1279
|
const edge = edges[i];
|
|
1280
1280
|
if (!edge.label || edge.draggable === false) continue;
|
|
1281
1281
|
if (labelEdgeIds.has(edge.id)) continue;
|
|
1282
|
+
if (edge.sourceId !== edge.targetId && movingNodeIds.has(edge.sourceId) && movingNodeIds.has(edge.targetId)) continue;
|
|
1282
1283
|
const source = deltasById.get(edge.sourceId);
|
|
1283
1284
|
if (!source) continue;
|
|
1284
1285
|
const target = edge.targetId === edge.sourceId ? source : deltasById.get(edge.targetId);
|
|
@@ -4380,6 +4381,7 @@ function panePressSession(down) {
|
|
|
4380
4381
|
panning = true;
|
|
4381
4382
|
return { commands: [
|
|
4382
4383
|
trigger("clearSelection"),
|
|
4384
|
+
trigger("clearFocus"),
|
|
4383
4385
|
trigger("panStart", down.screenPoint),
|
|
4384
4386
|
trigger("pan", event.screenPoint)
|
|
4385
4387
|
] };
|
|
@@ -4387,7 +4389,7 @@ function panePressSession(down) {
|
|
|
4387
4389
|
return { commands: [trigger("pan", event.screenPoint)] };
|
|
4388
4390
|
}
|
|
4389
4391
|
if (event.kind === "pointer.up") return {
|
|
4390
|
-
commands: panning ? [trigger("panEnd")] : [trigger("clearSelection")],
|
|
4392
|
+
commands: panning ? [trigger("panEnd")] : [trigger("clearSelection"), trigger("clearFocus")],
|
|
4391
4393
|
status: "end"
|
|
4392
4394
|
};
|
|
4393
4395
|
if (event.kind === "pointer.cancel") return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statelyai/flow",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Framework-agnostic flow visualization engine. Builds on @statelyai/graph.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flow",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"typescript": "^5.8.0",
|
|
42
42
|
"vite": "^8.0.0",
|
|
43
43
|
"vitest": "^4.1.0",
|
|
44
|
-
"@statelyai/flow-dom": "3.0.
|
|
44
|
+
"@statelyai/flow-dom": "3.0.1"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"dev": "tsdown --watch",
|