Skip to content

Commit

Permalink
fix: firing move event for insertion marker (google#8000)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeksOmega authored and johnnesky committed Apr 13, 2024
1 parent dd25672 commit a3c50ce
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions core/insertion_marker_previewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,18 @@ export class InsertionMarkerPreviewer implements IConnectionPreviewer {
};
const originalOffsetInBlock = markerConn.getOffsetInBlock().clone();
renderManagement.finishQueuedRenders().then(() => {
// Position so that the existing block doesn't move.
marker?.positionNearConnection(
markerConn,
originalOffsetToTarget,
originalOffsetInBlock,
);
marker?.getSvgRoot().setAttribute('visibility', 'visible');
eventUtils.disable();
try {
// Position so that the existing block doesn't move.
marker?.positionNearConnection(
markerConn,
originalOffsetToTarget,
originalOffsetInBlock,
);
marker?.getSvgRoot().setAttribute('visibility', 'visible');
} finally {
eventUtils.enable();
}
});
return markerConn;
}
Expand Down

0 comments on commit a3c50ce

Please sign in to comment.