Fix recently introduced issue with Node.js

This commit is contained in:
Jürg Lehni 2013-11-26 17:32:41 +01:00
parent 223ad2e714
commit 78e4f3e1b2

View file

@ -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);
},