Fix : bugs in imageToBlob and PngExportController

This commit is contained in:
jdescottes 2014-06-17 07:46:15 +02:00
parent d0739e811d
commit fbb5ccc7e2
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@
document.querySelector(".zip-generate-button").addEventListener('click', this.onZipButtonClick_.bind(this));
this.setPreviewSrc_(this.getFramesheetAsCanvas().toDataURL("image/png"));
this.updatePreview_(this.getFramesheetAsCanvas().toDataURL("image/png"));
};
ns.PngExportController.prototype.onPngDownloadButtonClick_ = function (evt) {
@ -81,7 +81,7 @@
}
};
ns.PngExportController.prototype.setPreviewSrc_ = function (src) {
ns.PngExportController.prototype.updatePreview_ = function (src) {
this.previewContainerEl.innerHTML = "<img class='light-picker-background' style='max-width:240px;' src='"+src+"'/>";
};

View File

@ -30,7 +30,7 @@
callback(this.mozGetAsFile("canvas", type));
} else {
var args = Array.prototype.slice.call(arguments, 2);
var dataURI = this.toDataURL.apply(this, args);
var dataURI = canvas.toDataURL.apply(canvas, args);
pskl.utils.ImageToBlob.imageDataToBlob(dataURI, type, callback);
}
}