diff options
| author | jmoenig <jens@moenig.org> | 2014-12-05 12:53:02 +0100 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-12-05 12:53:02 +0100 |
| commit | 6608d1098ffe6d6b5f23ba85ea842754724ec277 (patch) | |
| tree | 9486de8196d902e948cbf8bf41bb3fba499ff83f /morphic.js | |
| parent | 060643c1617766a0de0b7f0fc5592f118fadd89a (diff) | |
| download | snap-yow-6608d1098ffe6d6b5f23ba85ea842754724ec277.tar.gz snap-yow-6608d1098ffe6d6b5f23ba85ea842754724ec277.zip | |
Avoid auto-scaling artefacts in Safari on retina displays
(resulting in “traces” when dragging items)
Diffstat (limited to 'morphic.js')
| -rw-r--r-- | morphic.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) { |
