mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed mode switch bug
This commit is contained in:
parent
232e08f84d
commit
a56c9576a9
@ -26,11 +26,8 @@ function switchMode(currentMode, mustConfirm = true) {
|
|||||||
|
|
||||||
//switch to basic mode
|
//switch to basic mode
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|
||||||
//if there is a current layer (a document is active)
|
//if there is a current layer (a document is active)
|
||||||
if (currentLayer) {
|
if (currentLayer) {
|
||||||
|
|
||||||
//confirm with user before flattening image
|
//confirm with user before flattening image
|
||||||
if (mustConfirm ) {
|
if (mustConfirm ) {
|
||||||
if (!confirm('Switching to basic mode will flatten all the visible layers. Are you sure you want to continue?')) {
|
if (!confirm('Switching to basic mode will flatten all the visible layers. Are you sure you want to continue?')) {
|
||||||
|
@ -244,9 +244,10 @@ class Layer {
|
|||||||
layer.menuEntry.classList.add("selected-layer");
|
layer.menuEntry.classList.add("selected-layer");
|
||||||
currentLayer = layer;
|
currentLayer = layer;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
canvas = currentLayer.canvas;
|
canvas = currentLayer.canvas;
|
||||||
context = currentLayer.context;
|
context = currentLayer.context;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleLock() {
|
toggleLock() {
|
||||||
|
Loading…
Reference in New Issue
Block a user