From 1d66211c925556546404a8efcf4425307630f4ae Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 6 Aug 2019 13:17:29 +0200 Subject: [PATCH] Simplify scrollBar size calculations thanks, @cycomachead ! --- src/morphic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/morphic.js b/src/morphic.js index b2dfc217..bf4c9652 100644 --- a/src/morphic.js +++ b/src/morphic.js @@ -10667,7 +10667,7 @@ ScrollFrameMorph.prototype.scrollX = function (steps) { newX; if (this.vBar.isVisible) { - r -= this.vBar.width(); + r -= this.scrollBarSize; } newX = cl + steps; @@ -10690,7 +10690,7 @@ ScrollFrameMorph.prototype.scrollY = function (steps) { newY; if (this.hBar.isVisible) { - b -= this.hBar.height(); + b -= this.scrollBarSize; } newY = ct + steps;