summaryrefslogtreecommitdiff
path: root/byob.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-24 15:11:27 +0200
committerjmoenig <jens@moenig.org>2013-04-24 15:11:27 +0200
commitd0878399fe0a85a05642a223dd4796badd212c5c (patch)
treed4716373f06d687db7d947d24bc4d50d8249deba /byob.js
parent6bafe43b8f131abc283d326a887b1ac105a05e80 (diff)
downloadsnap-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.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/byob.js b/byob.js
index ffcc349..1dc1f2b 100644
--- a/byob.js
+++ b/byob.js
@@ -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();