summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-05-14 14:18:46 +0200
committerjmoenig <jens@moenig.org>2013-05-14 14:18:46 +0200
commit4c44efdc1e7a2c1bb06274b206de7a982fb03d12 (patch)
tree3fd05e685edf9445183f8f72351d174bba762a42
parentb250bb26835c6c4f3708e66ee32912db71e40d8d (diff)
downloadsnap-4c44efdc1e7a2c1bb06274b206de7a982fb03d12.tar.gz
snap-4c44efdc1e7a2c1bb06274b206de7a982fb03d12.zip
Paint editor fixes
-rw-r--r--objects.js2
-rw-r--r--paint.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/objects.js b/objects.js
index f50194b..5b03f2d 100644
--- a/objects.js
+++ b/objects.js
@@ -4519,7 +4519,7 @@ Costume.prototype.bounds = function () {
Costume.prototype.shrinkWrap = function () {
// adjust my contents' bounds to my visible bounding box
- var bb = this.boundingBox(),
+ var bb = this.boundingBox().expandBy(3), // tolerance for anti-aliasing
ext = bb.extent(),
pic = newCanvas(ext),
ctx = pic.getContext('2d');
diff --git a/paint.js b/paint.js
index 9278186..0f1d8e1 100644
--- a/paint.js
+++ b/paint.js
@@ -539,8 +539,8 @@ PaintCanvasMorph.prototype.centermerge = function(a, b) {
);
};
-PaintCanvasMorph.prototype.clearCanvas = function() {
- this.fixLayout();
+PaintCanvasMorph.prototype.clearCanvas = function() {
+ this.buildContents();
this.drawNew();
this.changed();
};