rename layer keyboard event fix
This commit is contained in:
parent
05b90149a0
commit
5498b22c98
|
@ -19,11 +19,6 @@ export default {
|
|||
window.removeEventListener("keydown", this.keyListener.bind(this));
|
||||
},
|
||||
created() {
|
||||
// window.stopKeyEvents = true
|
||||
if (!window.stopKeyEvents) {
|
||||
window.stopKeyEvents = false
|
||||
}
|
||||
|
||||
this.keyListener = function (e) {
|
||||
// Stop blocking input when modals are open
|
||||
// Whatever this char "'\0'" is it'd occur even without pressing any keys
|
||||
|
|
|
@ -146,7 +146,7 @@ export default {
|
|||
return "bg-gray-200";
|
||||
},
|
||||
showLayerRename(key, label) {
|
||||
window.stopKeyEvents = true;
|
||||
this.$store.commit("toggleDisableKeyboard", true);
|
||||
this.$dialog
|
||||
.prompt({
|
||||
title: "Rename Layer",
|
||||
|
@ -160,7 +160,7 @@ export default {
|
|||
this.$toasted.show("You must enter a layer name!", {
|
||||
type: "error",
|
||||
});
|
||||
window.stopKeyEvents = false;
|
||||
this.$store.commit("toggleDisableKeyboard", false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ export default {
|
|||
this.updateLayerName(key, result.input);
|
||||
}
|
||||
|
||||
window.stopKeyEvents = false;
|
||||
this.$store.commit("toggleDisableKeyboard", false);
|
||||
});
|
||||
},
|
||||
updateLayerName(key, label) {
|
||||
|
|
|
@ -1260,11 +1260,6 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
// If the current pixel is not which needs to be replaced
|
||||
// if (cyrb53(JSON.stringify(fillBlocks[y][x]) !== cyrb53(JSON.stringify(current)))) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// If the current pixel is not which needs to be replaced
|
||||
if (this.canText && fillBlocks[y][x].char !== current.char) {
|
||||
fillBlocks[y][x].bg = eraser ? null : this.currentBg;
|
||||
|
|
Loading…
Reference in New Issue