Fixed animation preview when deleting

This commit is contained in:
juliandescottes
2012-09-05 00:42:25 +02:00
19 changed files with 228 additions and 193 deletions

View File

@ -51,12 +51,13 @@
};
ns.AnimatedPreviewController.prototype.refreshAnimatedPreview = function () {
this.renderer.render(this.framesheet.getFrameByIndex(this.animIndex), this.previewCanvas, this.dpi);
this.animIndex++;
if (this.animIndex == this.framesheet.getFrameCount()) {
this.animIndex = 0;
}
this.startAnimationTimer();
if (!this.framesheet.hasFrameAtIndex(this.animIndex)) {
this.animIndex = 0;
}
this.renderer.render(this.framesheet.getFrameByIndex(this.animIndex), this.previewCanvas, this.dpi);
this.animIndex++;
this.startAnimationTimer();
};
})();