toImage improvement

This commit is contained in:
Лаврёнов Антон
2013-11-12 18:57:58 +08:00
parent 7b83cdf8aa
commit d4b2892c13
2 changed files with 35 additions and 2 deletions

View File

@@ -1005,8 +1005,8 @@
x = config.x || 0,
y = config.y || 0,
canvas = new Kinetic.SceneCanvas({
width: config.width || stage.getWidth(),
height: config.height || stage.getHeight(),
width: this.getWidth() || config.width || (stage ? stage.getWidth() : 0),
height: this.getHeight() || config.height || (stage ? stage.getHeight() : 0),
pixelRatio: 1
}),
context = canvas.getContext();