Solved conflict

This commit is contained in:
unsettledgames 2021-09-18 22:32:58 +02:00
parent c61b5a9d80
commit a930fabcba
2 changed files with 6 additions and 6 deletions

View File

@ -72,11 +72,11 @@ const FileManager = (() => {
var emptyCanvas = document.createElement("canvas");
var layersCopy = layers.slice();
exportCanvas.width = canvasSize[0];
exportCanvas.height = canvasSize[1];
exportCanvas.width = layers[0].canvasSize[0];
exportCanvas.height = layers[0].canvasSize[1];
emptyCanvas.width = canvasSize[0];
emptyCanvas.height = canvasSize[1];
emptyCanvas.width = layers[0].canvasSize[0];
emptyCanvas.height = layers[0].canvasSize[1];
// Sorting the layers by z index
layersCopy.sort((a, b) => (a.canvas.style.zIndex > b.canvas.style.zIndex) ? 1 : -1);

View File

@ -69,8 +69,8 @@ const LayerList = (() => {
*/
function mergeLayers(belowLayer, topLayer) {
// Copying the above content on the layerBelow
let belowImageData = belowLayer.getImageData(0, 0, currentLayer.canvas.width, currentLayer.canvas.height);
let toMergeImageData = topLayer.getImageData(0, 0, currentLayer.canvas.width, currentLayer.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<belowImageData.data.length; i+=4) {
let currentMovePixel = [