Debug info while caching

This commit is contained in:
Лаврёнов Антон 2014-03-12 00:01:58 +08:00
parent b364af6f4d
commit b8945b8fed

View File

@ -150,8 +150,12 @@
width = conf.width || this.width(),
height = conf.height || this.height(),
drawBorder = conf.drawBorder || false,
layer = this.getLayer(),
cachedSceneCanvas = new Kinetic.SceneCanvas({
layer = this.getLayer();
if (width === 0 || height === 0) {
Kinetic.Util.warn('Width or height of caching configuration equals 0. Cache is ignored.');
return;
}
var cachedSceneCanvas = new Kinetic.SceneCanvas({
pixelRatio: 1,
width: width,
height: height