From dd99db8d2d6cd95d97aea642f647ca0298e71dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 26 Sep 2014 18:03:37 +0200 Subject: [PATCH] Allow 'false' as well as 'off' for hidpi attribute, since that's what's in use for other attributes as well. --- src/path/PathItem.js | 2 +- src/ui/CanvasView.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/PathItem.js b/src/path/PathItem.js index e638e1e0..bd58de9c 100644 --- a/src/path/PathItem.js +++ b/src/path/PathItem.js @@ -536,7 +536,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{ * path2.add(new Point(180, 25)); * * // To draw an arc in anticlockwise direction, - * // we pass 'false' as the second argument to arcTo: + * // we pass `false` as the second argument to arcTo: * path2.arcTo(new Point(280, 25), false); * * @example {@paperscript height=300} diff --git a/src/ui/CanvasView.js b/src/ui/CanvasView.js index 319bf970..19f95db5 100644 --- a/src/ui/CanvasView.js +++ b/src/ui/CanvasView.js @@ -47,7 +47,7 @@ var CanvasView = View.extend(/** @lends CanvasView# */{ this._eventCounters = {}; this._pixelRatio = 1; /*#*/ if (__options.environment == 'browser') { - if (PaperScope.getAttribute(canvas, 'hidpi') !== 'off') { + if (!/^off|false$/.test(PaperScope.getAttribute(canvas, 'hidpi'))) { // Hi-DPI Canvas support based on: // http://www.html5rocks.com/en/tutorials/canvas/hidpi/ var deviceRatio = window.devicePixelRatio || 1,