stickyflow 0.11.1 → 0.11.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/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,12 @@ Two things count as breaking here that are easy to overlook:
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [0.11.2] - 2026-10-31
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- `applyMoveChanges` skips an object whose frame moves in the same drag. Its position is relative to the frame, so it moved twice before.
|
|
25
|
+
|
|
20
26
|
## [0.11.1] - 2026-10-30
|
|
21
27
|
|
|
22
28
|
### Added
|
|
@@ -7246,7 +7246,22 @@ function movePathPoints(lines, range, dx, dy) {
|
|
|
7246
7246
|
function applyMoveChanges(sfl, events) {
|
|
7247
7247
|
const state = chunkUHKFJBY5_cjs.sflToCanvasState(sfl);
|
|
7248
7248
|
const lines = sfl.split("\n");
|
|
7249
|
+
const parents = new Map(state.canvasObjects.map((candidate) => [candidate.id, candidate.parentFrameId]));
|
|
7250
|
+
const moving = new Set(events.map((event) => event.owner.id));
|
|
7251
|
+
const hasMovingAncestor = (id) => {
|
|
7252
|
+
const seen = /* @__PURE__ */ new Set();
|
|
7253
|
+
for (let parent = parents.get(id); parent && !seen.has(parent); parent = parents.get(parent)) {
|
|
7254
|
+
if (moving.has(parent)) {
|
|
7255
|
+
return true;
|
|
7256
|
+
}
|
|
7257
|
+
seen.add(parent);
|
|
7258
|
+
}
|
|
7259
|
+
return false;
|
|
7260
|
+
};
|
|
7249
7261
|
for (const event of events) {
|
|
7262
|
+
if (hasMovingAncestor(event.owner.id)) {
|
|
7263
|
+
continue;
|
|
7264
|
+
}
|
|
7250
7265
|
const canvasObject = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
|
|
7251
7266
|
const range = canvasObject ? findOwnerBlock(lines, event.owner.id) : null;
|
|
7252
7267
|
if (!canvasObject || !range) {
|