mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Subtract metrics.contentTop from metrics.viewTop so that the flyout does not begin to scroll down once the delta is smaller than the value of metrics.contentTop (#1309)
This commit is contained in:
@@ -214,7 +214,7 @@ Blockly.VerticalFlyout.prototype.wheel_ = function(e) {
|
||||
delta *= 10;
|
||||
}
|
||||
var metrics = this.getMetrics_();
|
||||
var pos = metrics.viewTop + delta;
|
||||
var pos = (metrics.viewTop - metrics.contentTop) + delta;
|
||||
var limit = metrics.contentHeight - metrics.viewHeight;
|
||||
pos = Math.min(pos, limit);
|
||||
pos = Math.max(pos, 0);
|
||||
|
||||
Reference in New Issue
Block a user