fix: fixed scrolling behavior inside editor when plan editor window is opened

ref: N25B-412
This commit is contained in:
JGerla
2026-01-05 15:53:20 +01:00
parent 149b82cb66
commit 111400bd82
4 changed files with 227 additions and 205 deletions

View File

@@ -48,7 +48,8 @@ const selector = (state: FlowState) => ({
undo: state.undo,
redo: state.redo,
beginBatchAction: state.beginBatchAction,
endBatchAction: state.endBatchAction
endBatchAction: state.endBatchAction,
scrollable: state.scrollable
});
// --| define ReactFlow editor |--
@@ -72,7 +73,8 @@ const VisProgUI = () => {
undo,
redo,
beginBatchAction,
endBatchAction
endBatchAction,
scrollable
} = useFlowStore(useShallow(selector)); // instructs the editor to use the corresponding functions from the FlowStore
// adds ctrl+z and ctrl+y support to respectively undo and redo actions
@@ -101,6 +103,7 @@ const VisProgUI = () => {
onConnect={onConnect}
onNodeDragStart={beginBatchAction}
onNodeDragStop={endBatchAction}
preventScrolling={scrollable}
snapToGrid
fitView
proOptions={{hideAttribution: true}}