mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix : bugs in imageToBlob and PngExportController
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
document.querySelector(".zip-generate-button").addEventListener('click', this.onZipButtonClick_.bind(this));
|
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) {
|
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+"'/>";
|
this.previewContainerEl.innerHTML = "<img class='light-picker-background' style='max-width:240px;' src='"+src+"'/>";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
callback(this.mozGetAsFile("canvas", type));
|
callback(this.mozGetAsFile("canvas", type));
|
||||||
} else {
|
} else {
|
||||||
var args = Array.prototype.slice.call(arguments, 2);
|
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);
|
pskl.utils.ImageToBlob.imageDataToBlob(dataURI, type, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user