Skip to content

Commit 5f1be40

Browse files
committed
tweak(align-branch): align parent with active-node on view resize
1 parent 267e794 commit 5f1be40

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/stores/view/subscriptions/effects/align-branch/create-align-branch-actions/lazy-vertical-scrolling-mode.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ export const lazyVerticalScrollingMode = (
1616
} else {
1717
actions.push({ action: '20/active-node/vertical/reveal' });
1818
}
19+
} else if (
20+
action.type === 'WORKSPACE/RESIZE' ||
21+
action.type === 'WORKSPACE/ACTIVE_LEAF_CHANGE' ||
22+
action.type === 'view/left-sidebar/toggle' ||
23+
action.type === 'view/left-sidebar/set-width'
24+
) {
25+
actions.push({ action: '20/active-node/vertical/reveal' });
26+
actions.push({
27+
action: '30/parents/vertical/align-with-active-node',
28+
});
29+
actions.push({
30+
action: '40/children/vertical/align-with-active-node',
31+
});
1932
} else {
2033
actions.push({ action: '20/active-node/vertical/reveal' });
2134
const previousActiveBranch = context.previousActiveBranch;

0 commit comments

Comments
 (0)