Skip to content

Commit

Permalink
Change tooltips order on tab drag
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishk98 committed Dec 23, 2018
1 parent 77bb809 commit 4b970aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/renderer/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ class ServerManagerView {
// To handle position of servers' tooltip due to scrolling of list of organizations
// This could not be handled using CSS, hence the top of the tooltip is made same
// as that of its parent element.
const { top } = this.$serverIconTooltip[index].parentElement.getBoundingClientRect();
let top = null;
if (!!this.state.dragged && index > dragged.oldIndex && index <= dragged.newIndex) {
top = this.$serverIconTooltip[index + (dragged.direction) * 1].parentElement.getBoundingClientRect().top;
} else {
top = this.$serverIconTooltip[index].parentElement.getBoundingClientRect().top;
}
this.$serverIconTooltip[index].style.top = top + 'px';
}

Expand Down

0 comments on commit 4b970aa

Please sign in to comment.