Skip to content

Commit

Permalink
Merge branch 'hotfix/3.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
deathau committed Nov 9, 2020
2 parents 33122c7 + c196372 commit 14349d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default class SlidingPanesPlugin extends Plugin {
? (i * this.settings.headerWidth) + "px"
: null;
leaf.containerEl.style.right = this.settings.stackingEnabled
? (((leafCount - i - 1) * this.settings.headerWidth) - leaf.containerEl.clientWidth) + "px"
? (((leafCount - i) * this.settings.headerWidth) - leaf.containerEl.clientWidth) + "px"
: null;
leaf.containerEl.style.flex = null;
// keep track of the total width of all leaves
Expand Down Expand Up @@ -313,7 +313,7 @@ export default class SlidingPanesPlugin extends Plugin {
// get this leaf's left value (the amount of space to the left for sticky headers)
const left = parseInt(activeLeaf.containerEl.style.left) || 0;
// the amount of space to the right we need to leave for sticky headers
const headersToRightWidth = this.settings.stackingEnabled ? (leafCount - this.activeLeafIndex - 2) * this.settings.headerWidth : 0;
const headersToRightWidth = this.settings.stackingEnabled ? (leafCount - this.activeLeafIndex - 1) * this.settings.headerWidth : 0;
// the root element we need to scroll
const rootEl = this.rootSplitAny.containerEl;

Expand Down
3 changes: 2 additions & 1 deletion styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
body.plugin-sliding-panes .workspace>.mod-root {
overflow: auto;
overflow-x: auto;
overflow-y: hidden;

&>.workspace-leaf {
display: block;
Expand Down

0 comments on commit 14349d1

Please sign in to comment.