mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
fix: firing move event for insertion marker (#8000)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user