Let the scrollbar go to the top of the railway

- Previously the scrollbar was limited so that it couldn't go right to
  the top, this commit removes that limit

Signed-off-by: Skyler Grey <skyler3665@gmail.com>
Change-Id: I7fec85ba013a924ca8880c54fc214dfa32387dd1
This commit is contained in:
Skyler Grey 2022-08-16 14:54:35 +01:00 committed by Szymon Kłos
parent 6e79ab2402
commit c75dc751af

View file

@ -272,7 +272,7 @@ class ScrollSection {
}
result.ratio = app.view.size.pixels[1] / result.scrollLength; // 1px scrolling = xpx document height.
result.startY = Math.round(this.documentTopLeft[1] / result.ratio + this.sectionProperties.scrollBarThickness * 0.5 + this.sectionProperties.yOffset);
result.startY = Math.round(this.documentTopLeft[1] / result.ratio + this.sectionProperties.yOffset);
return result;
}
@ -335,7 +335,7 @@ class ScrollSection {
}
result.ratio = app.view.size.pixels[0] / result.scrollLength;
result.startX = Math.round(this.documentTopLeft[0] / result.ratio + this.sectionProperties.scrollBarThickness * 0.5 + this.sectionProperties.xOffset);
result.startX = Math.round(this.documentTopLeft[0] / result.ratio + this.sectionProperties.xOffset);
return result;
}