From 6608d1098ffe6d6b5f23ba85ea842754724ec277 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 5 Dec 2014 12:53:02 +0100 Subject: [PATCH] Avoid auto-scaling artefacts in Safari on retina displays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (resulting in “traces” when dragging items) --- history.txt | 4 ++++ morphic.js | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/history.txt b/history.txt index 5be35f0a..f1baa922 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 a001c6ff..96168972 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) {