Skip to content

Commit 4b970aa

Browse files
committed
Change tooltips order on tab drag
1 parent 77bb809 commit 4b970aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/renderer/js/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,12 @@ class ServerManagerView {
285285
// To handle position of servers' tooltip due to scrolling of list of organizations
286286
// This could not be handled using CSS, hence the top of the tooltip is made same
287287
// as that of its parent element.
288-
const { top } = this.$serverIconTooltip[index].parentElement.getBoundingClientRect();
288+
let top = null;
289+
if (!!this.state.dragged && index > dragged.oldIndex && index <= dragged.newIndex) {
290+
top = this.$serverIconTooltip[index + (dragged.direction) * 1].parentElement.getBoundingClientRect().top;
291+
} else {
292+
top = this.$serverIconTooltip[index].parentElement.getBoundingClientRect().top;
293+
}
289294
this.$serverIconTooltip[index].style.top = top + 'px';
290295
}
291296

0 commit comments

Comments
 (0)