mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix recently introduced issue with Node.js
This commit is contained in:
parent
223ad2e714
commit
78e4f3e1b2
1 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,7 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
|
|||
// Have Item count installed mouse events.
|
||||
this._eventCounters = {};
|
||||
this._ratio = 1;
|
||||
/*#*/ if (options.environment == 'browser') {
|
||||
if (PaperScope.getAttribute(canvas, 'hidpi') !== 'off') {
|
||||
// Hi-DPI Canvas support based on:
|
||||
// http://www.html5rocks.com/en/tutorials/canvas/hidpi/
|
||||
|
@ -54,6 +55,7 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
|
|||
'backingStorePixelRatio') || 1;
|
||||
this._ratio = deviceRatio / backingStoreRatio;
|
||||
}
|
||||
/*#*/ } // options.environment == 'browser'
|
||||
View.call(this, canvas);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue