summaryrefslogtreecommitdiff
path: root/paint.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-05-14 16:53:28 +0200
committerjmoenig <jens@moenig.org>2013-05-14 16:53:28 +0200
commitc8029a03e9d7720999d02d751abf49d52ec85e16 (patch)
treecfc90b51e843f1ba118e54d88d78b1a906c1f218 /paint.js
parentd267b696af1e7a429c4b31dc87b46dc638c3509f (diff)
downloadsnap-byow-c8029a03e9d7720999d02d751abf49d52ec85e16.tar.gz
snap-byow-c8029a03e9d7720999d02d751abf49d52ec85e16.zip
Paint editor fixes and credits
Diffstat (limited to 'paint.js')
-rw-r--r--paint.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/paint.js b/paint.js
index 0f1d8e1..a7b36e3 100644
--- a/paint.js
+++ b/paint.js
@@ -208,16 +208,15 @@ PaintEditorMorph.prototype.buildEdits = function() {
PaintEditorMorph.prototype.openIn = function(world, oldim, oldrc, callback) {
// Open the editor in a world with an optional image to edit
- this.setCenter(world.center());
this.oldim = oldim;
this.oldrc = oldrc.copy();
this.callback = callback || nop;
- world.add(this);
- this.world().keyboardReceiver = this;
+
this.processKeyUp = function() {
this.shift = false;
this.propertiesControls.constrain.refresh();
};
+
this.processKeyDown = function() {
this.shift = this.world().currentKey === 16;
this.propertiesControls.constrain.refresh();
@@ -235,8 +234,9 @@ PaintEditorMorph.prototype.openIn = function(world, oldim, oldrc, callback) {
);
this.paper.drawNew();
}
-
- this.fullChanged();
+
+ this.key = 'paint';
+ this.popUp(world);
};
PaintEditorMorph.prototype.fixLayout = function() {