diff options
| author | jmoenig <jens@moenig.org> | 2013-09-30 14:41:59 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-09-30 14:41:59 +0200 |
| commit | dc709c2e1282e2056d74d3a9ba77e21b50d463f4 (patch) | |
| tree | d2e8c31993f3b73b594a60ebe2172ab4f2f8386e | |
| parent | 8eb98dc5b1b9f7377c3116df4f6399634557c313 (diff) | |
| download | snap-yow-dc709c2e1282e2056d74d3a9ba77e21b50d463f4.tar.gz snap-yow-dc709c2e1282e2056d74d3a9ba77e21b50d463f4.zip | |
fixed #186 (can't duplicate blocks with anchored comments)
| -rw-r--r-- | blocks.js | 15 | ||||
| -rwxr-xr-x | history.txt | 4 |
2 files changed, 11 insertions, 8 deletions
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2013-August-02'; +modules.blocks = '2013-September-30'; var SyntaxElementMorph; var BlockMorph; @@ -2910,10 +2910,10 @@ BlockMorph.prototype.situation = function () { // BlockMorph sticky comments -BlockMorph.prototype.prepareToBeGrabbed = function () { +BlockMorph.prototype.prepareToBeGrabbed = function (hand) { var myself = this; this.allComments().forEach(function (comment) { - comment.startFollowing(myself); + comment.startFollowing(myself, hand.world); }); }; @@ -10133,7 +10133,7 @@ CommentMorph.prototype.userMenu = function () { menu.addItem( "duplicate", function () { - this.fullCopy().pickUp(this.world()); + myself.fullCopy().pickUp(myself.world()); }, 'make a copy\nand pick it up' ); @@ -10252,14 +10252,13 @@ CommentMorph.prototype.align = function (topBlock, ignoreLayer) { } }; -CommentMorph.prototype.startFollowing = function (topBlock) { - var myself = this; +CommentMorph.prototype.startFollowing = function (topBlock, world) { this.align(topBlock); - this.world().add(this); + world.add(this); this.addShadow(); this.stickyOffset = this.position().subtract(this.block.position()); this.step = function () { - myself.setPosition(this.block.position().add(myself.stickyOffset)); + this.setPosition(this.block.position().add(this.stickyOffset)); }; }; diff --git a/history.txt b/history.txt index 1134bd5..446505f 100755 --- a/history.txt +++ b/history.txt @@ -1925,3 +1925,7 @@ ______ 130920 ------ * Morphic: fixed #172, Rectangle.amountToTranslateWithin() for IF ON EDGE, BOUNCE + +130930 +------ +* Blocks: fixed #186 (can't duplicate blocks with anchored comments) |
