diff --git a/blocks.js b/blocks.js index 3fca659f..8847aaa7 100644 --- a/blocks.js +++ b/blocks.js @@ -993,7 +993,9 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { 'pressed' : ['pressed'], 'dropped' : ['dropped'], 'mouse-entered' : ['mouse-entered'], - 'mouse-departed' : ['mouse-departed'] + 'mouse-departed' : ['mouse-departed'], + 'scrolled-up' : ['scrolled-up'], + 'scrolled-down' : ['scrolled-down'] }, true // read-only ); diff --git a/objects.js b/objects.js index 37ffb774..46d6bd47 100644 --- a/objects.js +++ b/objects.js @@ -4827,6 +4827,10 @@ SpriteMorph.prototype.mouseDownLeft = function () { return this.receiveUserInteraction('pressed'); }; +SpriteMorph.prototype.mouseScroll = function (y) { + return this.receiveUserInteraction('scrolled-' + (y > 0 ? 'up' : 'down')); +}; + SpriteMorph.prototype.receiveUserInteraction = function (interaction) { var stage = this.parentThatIsA(StageMorph), procs = [],