summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-12-05 12:53:02 +0100
committerjmoenig <jens@moenig.org>2014-12-05 12:53:02 +0100
commit6608d1098ffe6d6b5f23ba85ea842754724ec277 (patch)
tree9486de8196d902e948cbf8bf41bb3fba499ff83f
parent060643c1617766a0de0b7f0fc5592f118fadd89a (diff)
downloadsnap-6608d1098ffe6d6b5f23ba85ea842754724ec277.tar.gz
snap-6608d1098ffe6d6b5f23ba85ea842754724ec277.zip
Avoid auto-scaling artefacts in Safari on retina displays
(resulting in “traces” when dragging items)
-rwxr-xr-xhistory.txt4
-rw-r--r--morphic.js6
2 files changed, 8 insertions, 2 deletions
diff --git a/history.txt b/history.txt
index 5be35f0..f1baa92 100755
--- a/history.txt
+++ b/history.txt
@@ -2382,3 +2382,7 @@ ______
------
* Threads, Objects: Experimental “ForEach” primitive (hidden in dev mode)
* GUI: Another attempt at pointing the project dialog to the cloud if signed in
+
+141205
+------
+* Morphic: Avoid auto-scaling artefacts in Safari on retina displays (resulting in “traces” when dragging items)
diff --git a/morphic.js b/morphic.js
index a001c6f..9616897 100644
--- a/morphic.js
+++ b/morphic.js
@@ -1041,7 +1041,7 @@
/*global window, HTMLCanvasElement, getMinimumFontHeight, FileReader, Audio,
FileList, getBlurredShadowSupport*/
-var morphicVersion = '2014-December-03';
+var morphicVersion = '2014-December-05';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug
@@ -1931,7 +1931,9 @@ Rectangle.prototype.round = function () {
Rectangle.prototype.spread = function () {
// round me by applying floor() to my origin and ceil() to my corner
- return this.origin.floor().corner(this.corner.ceil());
+ // expand by 1 to be on the safe side, this eliminates rounding
+ // artefacts caused by Safari's auto-scaling on retina displays
+ return this.origin.floor().corner(this.corner.ceil()).expandBy(1);
};
Rectangle.prototype.amountToTranslateWithin = function (aRect) {