diff options
| author | Jens Mönig <jens@moenig.org> | 2013-04-23 08:27:46 -0700 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2013-04-23 08:27:46 -0700 |
| commit | 49998bb0dee32016c5e6242274814dd43e38f681 (patch) | |
| tree | 96e94d361804a95c0d0e33bf51c4f1a29eb5d47f /byob.js | |
| parent | 3328d87f2fb95a800e775530e711343cde545e89 (diff) | |
| parent | cad54f7433f48a016f3ebc8ae37a6fe75090bcfb (diff) | |
| download | snap-49998bb0dee32016c5e6242274814dd43e38f681.tar.gz snap-49998bb0dee32016c5e6242274814dd43e38f681.zip | |
Merge pull request #74 from queryselector/issue-23
Fixed #23
Diffstat (limited to 'byob.js')
| -rw-r--r-- | byob.js | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -1026,6 +1026,10 @@ BlockDialogMorph.prototype = new DialogBoxMorph(); BlockDialogMorph.prototype.constructor = BlockDialogMorph; BlockDialogMorph.uber = DialogBoxMorph.prototype; +// BlockDialogMorph constants: + +BlockDialogMorph.prototype.key = 'makeABlock'; + // BlockDialogMorph instance creation: function BlockDialogMorph(target, action, environment) { @@ -1099,11 +1103,7 @@ BlockDialogMorph.prototype.openForChange = function ( this.scopes = null; this.fixLayout(); this.drawNew(); - if (world) { - world.add(this); - this.setCenter(world.center()); - this.edit(); - } + this.popUp(world); }; // category buttons @@ -1544,8 +1544,7 @@ BlockEditorMorph.prototype.popUp = function () { var world = this.target.world(); if (world) { - world.add(this); - world.keyboardReceiver = this; + BlockEditorMorph.uber.popUp.call(this, world); this.handle = new HandleMorph( this, 280, @@ -1553,7 +1552,6 @@ BlockEditorMorph.prototype.popUp = function () { this.corner, this.corner ); - this.setCenter(world.center()); } }; @@ -2424,11 +2422,7 @@ InputSlotDialogMorph.prototype.open = function ( this.fixLayout(); this.drawNew(); this.fixLayout(); - if (world) { - world.add(this); - this.setCenter(world.center()); - this.edit(); - } + this.popUp(world); this.add(this.types); // make the types come to front Morph.prototype.trackChanges = oldFlag; this.changed(); @@ -2846,6 +2840,10 @@ BlockExportDialogMorph.prototype = new DialogBoxMorph(); BlockExportDialogMorph.prototype.constructor = BlockExportDialogMorph; BlockExportDialogMorph.uber = DialogBoxMorph.prototype; +// BlockExportDialogMorph constants: + +BlockExportDialogMorph.prototype.key = 'blockExport'; + // BlockExportDialogMorph instance creation: function BlockExportDialogMorph(serializer, blocks) { @@ -2952,8 +2950,7 @@ BlockExportDialogMorph.prototype.buildContents = function () { BlockExportDialogMorph.prototype.popUp = function (wrrld) { var world = wrrld || this.target.world(); if (world) { - world.add(this); - world.keyboardReceiver = this; + BlockExportDialogMorph.uber.popUp.call(this, world); this.handle = new HandleMorph( this, 200, @@ -2961,7 +2958,6 @@ BlockExportDialogMorph.prototype.popUp = function (wrrld) { this.corner, this.corner ); - this.setCenter(world.center()); } }; @@ -3024,6 +3020,10 @@ BlockImportDialogMorph.prototype = new DialogBoxMorph(); BlockImportDialogMorph.prototype.constructor = BlockImportDialogMorph; BlockImportDialogMorph.uber = DialogBoxMorph.prototype; +// BlockImportDialogMorph constants: + +BlockImportDialogMorph.prototype.key = 'blockImport'; + // BlockImportDialogMorph instance creation: function BlockImportDialogMorph(blocks, target, name) { |
