From 9cb06e7d1a25080011439c8a29eb0e7dbaefcbf2 Mon Sep 17 00:00:00 2001 From: Jonathan Smith Date: Thu, 16 Sep 2021 07:30:10 +0100 Subject: [PATCH] Current canvas size now used when exporting --- js/_pixelEditorUtility.js | 4 ++-- js/_pixelExport.js | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/_pixelEditorUtility.js b/js/_pixelEditorUtility.js index 73fa2b8..3ba4f7e 100644 --- a/js/_pixelEditorUtility.js +++ b/js/_pixelEditorUtility.js @@ -7,8 +7,8 @@ */ function mergeLayers(belowLayer, topLayer) { // Copying the above content on the layerBelow - let belowImageData = belowLayer.getImageData(0, 0, canvas.width, canvas.height); - let toMergeImageData = topLayer.getImageData(0, 0, canvas.width, canvas.height); + let belowImageData = belowLayer.getImageData(0, 0, belowLayer.canvas.width, belowLayer.canvas.height); + let toMergeImageData = topLayer.getImageData(0, 0, topLayer.canvas.width, topLayer.canvas.height); for (let i=0; i (a.canvas.style.zIndex > b.canvas.style.zIndex) ? 1 : -1);