mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed bug when opening LPE file (the opposite editor mode was selected instead of the right one)
This commit is contained in:
parent
ba969aeffb
commit
c94c512748
@ -20,8 +20,8 @@ document.getElementById('open-image-browse-holder').addEventListener('change', f
|
||||
// Converting the data to a json object and creating a new pixel (see _newPixel.js for more)
|
||||
reader.onload = function (e) {
|
||||
let dictionary = JSON.parse(e.target.result);
|
||||
|
||||
newPixel(dictionary['canvasWidth'], dictionary['canvasHeight'], dictionary['editorMode'], dictionary);
|
||||
let mode = dictionary['editorMode'] == 'Advanced' ? 'Basic' : 'Advanced';
|
||||
newPixel(dictionary['canvasWidth'], dictionary['canvasHeight'], mode, dictionary);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -35,7 +35,6 @@ document.getElementById('open-image-browse-holder').addEventListener('change', f
|
||||
|
||||
//draw the image onto the canvas
|
||||
currentLayer.context.drawImage(img, 0, 0);
|
||||
console.log("qui");
|
||||
createPaletteFromLayers();
|
||||
|
||||
//track google event
|
||||
|
Loading…
Reference in New Issue
Block a user