Skip to content

Commit e86c731

Browse files
committed
fix(align-branch): wrong node is selected after dnd
1 parent 59c21aa commit e86c731

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/stores/view/subscriptions/effects/align-branch/align-branch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { LineageView } from 'src/view/view';
22
import { delay } from 'src/helpers/delay';
3-
import { delayAlign } from 'src/stores/view/subscriptions/effects/align-branch/helpers/retry-align';
3+
import { delayAlign } from 'src/stores/view/subscriptions/effects/align-branch/helpers/delay-align';
44
import { ActiveNodesOfColumn } from 'src/stores/view/view-state-type';
55
import { Column } from 'src/stores/document/document-state-type';
66
import { adjustScrollBehavior } from 'src/stores/view/subscriptions/effects/align-branch/helpers/adjust-scroll-behavior';

src/stores/view/subscriptions/effects/align-branch/helpers/retry-align.ts renamed to src/stores/view/subscriptions/effects/align-branch/helpers/delay-align.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export const delayAlign = (action: PluginAction) => {
77
action.type === 'VIEW/TOGGLE_MINIMAP'
88
) {
99
delay = 300;
10+
} else if (action.type === 'DOCUMENT/DROP_NODE') {
11+
delay = 32;
1012
}
1113
return delay;
1214
};

src/styles/layout/modes.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646
}
4747

48-
& .column {
48+
& .column{
4949
/* to show outline card buttons*/
5050
padding: 0 calc(1 / var(--zoom-level) * 50vw);
5151
}
@@ -94,9 +94,13 @@
9494
transition: none !important;
9595
}
9696
}
97+
9798
#columns-container.zoom-enabled {
98-
.lineage-floating-button {
99-
opacity: 0.5 !important;
99+
.lineage-floating-button{
100+
opacity: 0.5 !important
101+
}
102+
.lineage-card:not(:hover) .lineage-floating-button:not(.collapse-button) {
103+
visibility: hidden;
100104
}
101105
}
102106

0 commit comments

Comments
 (0)