diff --git a/src/blocks.js b/src/blocks.js index dadfbe4e..90763d25 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2020-April-29'; +modules.blocks = '2020-May-01'; var SyntaxElementMorph; var BlockMorph; @@ -4271,6 +4271,14 @@ BlockMorph.prototype.hasBlockVars = function () { ); }; +BlockMorph.prototype.pickUp = function (wrrld) { + // used when duplicating and grabbing a block via its context menu + // position the duplicate's top-left corner at the mouse pointer + var world = wrrld || this.world(); + this.setPosition(world.hand.position().subtract(this.rounding)); + world.hand.grab(this); +}; + // BlockMorph events BlockMorph.prototype.mouseClickLeft = function () {