mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Allow 'false' as well as 'off' for hidpi attribute, since that's what's in use for other attributes as well.
This commit is contained in:
parent
762113230a
commit
dd99db8d2d
2 changed files with 2 additions and 2 deletions
|
@ -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}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue