ReferenceError: window is not defined

```js
ReferenceError: window is not defined
  at /Users/ctslin/Documents/nodes/pboooks-nodejs/node_modules/konva/konva.js:1165:36
  at /Users/ctslin/Documents/nodes/pboooks-nodejs/node_modules/konva/konva.js:1173:11
```
This commit is contained in:
chitsung.lin 2015-04-20 21:50:33 +08:00
parent 41c10555bc
commit b70940ea1f

View File

@ -1162,7 +1162,7 @@ var Konva = {};
var canvas = Konva.Util.createCanvasElement(),
context = canvas.getContext('2d'),
_pixelRatio = (function() {
var devicePixelRatio = window.devicePixelRatio || 1,
var devicePixelRatio = Konva.window.devicePixelRatio || 1,
backingStoreRatio = context.webkitBackingStorePixelRatio
|| context.mozBackingStorePixelRatio
|| context.msBackingStorePixelRatio