Skip to content

Commit

Permalink
Always scrolls panels to the rightmost edge of the viewport (#110 #271)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Aug 20, 2020
1 parent 9f12806 commit 636d4eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/explorer/explorer-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export default class ExplorerView extends View {
const stackLeft = stack.getLeftBorderOffset();
const stackRight = stackLeft + stack.getWidth();
let scrollTarget;
if (stackRight - thisLeft < scrollFudge) {
scrollTarget = stackLeft;
} else if (thisRight - stackLeft < scrollFudge) {
if (stackRight - thisLeft < scrollFudge ||
thisRight - stackLeft < scrollFudge
) {
scrollTarget = stackRight - $(window).width();
} else {
if (callback) fastTimeout(callback);
Expand Down

0 comments on commit 636d4eb

Please sign in to comment.