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.
@@ -7244,7 +7244,22 @@ function movePathPoints(lines, range, dx, dy) {
7244
7244
  function applyMoveChanges(sfl, events) {
7245
7245
  const state = sflToCanvasState(sfl);
7246
7246
  const lines = sfl.split("\n");
7247
+ const parents = new Map(state.canvasObjects.map((candidate) => [candidate.id, candidate.parentFrameId]));
7248
+ const moving = new Set(events.map((event) => event.owner.id));
7249
+ const hasMovingAncestor = (id) => {
7250
+ const seen = /* @__PURE__ */ new Set();
7251
+ for (let parent = parents.get(id); parent && !seen.has(parent); parent = parents.get(parent)) {
7252
+ if (moving.has(parent)) {
7253
+ return true;
7254
+ }
7255
+ seen.add(parent);
7256
+ }
7257
+ return false;
7258
+ };
7247
7259
  for (const event of events) {
7260
+ if (hasMovingAncestor(event.owner.id)) {
7261
+ continue;
7262
+ }
7248
7263
  const canvasObject = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
7249
7264
  const range = canvasObject ? findOwnerBlock(lines, event.owner.id) : null;
7250
7265
  if (!canvasObject || !range) {