Skip to content

Commit

Permalink
fix activeEditor find in EditorStore refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Nov 5, 2024
1 parent f068dc5 commit 2567184
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions packages/project-editor/flow/editor/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ export const Canvas = observer(

const flowContext = this.props.flowContext;

console.log(event.deltaX, event.deltaY);

let deltaX = event.deltaX;
let deltaY = event.deltaY;

Expand Down
9 changes: 6 additions & 3 deletions packages/project-editor/store/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,17 @@ export class EditorsStore {
if (
parentNode &&
parentNode instanceof FlexLayout.TabSetNode &&
((!activeEditor && parentNode.getSelectedNode() == tab) ||
(parentNode.isActive() &&
parentNode.getSelectedNode() == tab))
parentNode.isActive() &&
parentNode.getSelectedNode() == tab
) {
activeEditor = editor;
}
}

if (!activeEditor) {
activeEditor = this.activeEditor;
}

this.tabIdToEditorMap = tabIdToEditorMap;

this.saveState();
Expand Down

0 comments on commit 2567184

Please sign in to comment.