diff options
| author | jmoenig <jens@moenig.org> | 2013-04-24 15:11:27 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-04-24 15:11:27 +0200 |
| commit | d0878399fe0a85a05642a223dd4796badd212c5c (patch) | |
| tree | d4716373f06d687db7d947d24bc4d50d8249deba /byob.js | |
| parent | 6bafe43b8f131abc283d326a887b1ac105a05e80 (diff) | |
| download | snap-byow-d0878399fe0a85a05642a223dd4796badd212c5c.tar.gz snap-byow-d0878399fe0a85a05642a223dd4796badd212c5c.zip | |
Fine-tune multiple dialog instance handling
prevent multiple block editors on the same block definition, allow
multiple dialogs on different objects, handle dialog instances in
DialogBoxMorph.prototype
Diffstat (limited to 'byob.js')
| -rw-r--r-- | byob.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -105,7 +105,7 @@ CommentMorph, localize, CSlotMorph, SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2013-April-23'; +modules.byob = '2013-April-24'; // Declarations @@ -1026,10 +1026,6 @@ 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) { @@ -1053,6 +1049,8 @@ BlockDialogMorph.prototype.init = function (target, action, environment) { ); // override inherited properites: + this.key = 'makeABlock'; + this.types = new AlignmentMorph('row', this.padding); this.add(this.types); this.scopes = new AlignmentMorph('row', this.padding); @@ -1079,6 +1077,7 @@ BlockDialogMorph.prototype.openForChange = function ( preventTypeChange // <bool> ) { var clr = SpriteMorph.prototype.blockColor[category]; + this.key = 'changeABlock'; this.category = category; this.blockType = type; @@ -1481,6 +1480,7 @@ BlockEditorMorph.prototype.init = function (definition, target) { ); // override inherited properites: + this.key = 'editBlock' + definition.spec; this.labelString = 'Block Editor'; this.createLabel(); |
