mirror of
https://github.com/google/blockly.git
synced 2026-01-15 04:47:10 +01:00
Merge pull request #2195 from BeksOmega/fixes/ScrollingHorizontalFlyout
Fixed Scrolling Horizontal Flyout with Mousewheel
This commit is contained in:
@@ -217,7 +217,7 @@ Blockly.HorizontalFlyout.prototype.scrollToStart = function() {
|
||||
* @private
|
||||
*/
|
||||
Blockly.HorizontalFlyout.prototype.wheel_ = function(e) {
|
||||
var delta = e.deltaX;
|
||||
var delta = e.deltaX || e.deltaY;
|
||||
|
||||
if (delta) {
|
||||
// Firefox's mouse wheel deltas are a tenth that of Chrome/Safari.
|
||||
@@ -225,7 +225,6 @@ Blockly.HorizontalFlyout.prototype.wheel_ = function(e) {
|
||||
if (goog.userAgent.GECKO && (e.deltaMode === 1)) {
|
||||
delta *= 10;
|
||||
}
|
||||
// TODO: #1093
|
||||
var metrics = this.getMetrics_();
|
||||
var pos = metrics.viewLeft + delta;
|
||||
var limit = metrics.contentWidth - metrics.viewWidth;
|
||||
|
||||
Reference in New Issue
Block a user