aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-03-27 00:57:05 +1100
committerTerry Truong <terry06890@gmail.com>2022-03-27 00:57:09 +1100
commite4ed024c433cac6216530f62306505e35887a450 (patch)
tree63575ca5cc796c3d5b059be23f3b000b0b5d69d8 /src
parent420734b0cc391b73b6f1a843accef34a510de10c (diff)
Make search shortcut cancel an active auto-mode
Diffstat (limited to 'src')
-rw-r--r--src/components/TileTree.vue20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue
index e0992b1..a7b6f83 100644
--- a/src/components/TileTree.vue
+++ b/src/components/TileTree.vue
@@ -233,7 +233,7 @@ export default defineComponent({
},
// For info modal events
onInnerInfoIconClicked(node: LayoutNode){
- this.closeModalsAndSettings();
+ this.closeModesAndSettings();
this.infoModalNode = node.tolNode;
},
onInfoModalClose(){
@@ -241,7 +241,7 @@ export default defineComponent({
},
//
onSettingsIconClick(){
- this.closeModalsAndSettings();
+ this.closeModesAndSettings();
this.settingsOpen = true;
},
onSettingsClose(){
@@ -252,7 +252,7 @@ export default defineComponent({
},
//
onSearchIconClick(){
- this.closeModalsAndSettings();
+ this.closeModesAndSettings();
this.searchOpen = true;
},
onSearchClose(){
@@ -260,20 +260,21 @@ export default defineComponent({
},
onSearchNode(tolNode: TolNode){
this.searchOpen = false;
- this.setLastFocused(null);
this.animationActive = true;
this.expandToTolNode(tolNode);
},
//
- closeModalsAndSettings(){
+ closeModesAndSettings(){
this.infoModalNode = null;
this.searchOpen = false;
- this.settingsOpen = false;
this.helpOpen = false;
+ this.settingsOpen = false;
+ this.animationActive = false;
+ this.setLastFocused(null);
},
onKeyUp(evt: KeyboardEvent){
if (evt.key == 'Escape'){
- this.closeModalsAndSettings();
+ this.closeModesAndSettings();
} else if (evt.key == 'F' && evt.ctrlKey){
if (!this.searchOpen){
this.onSearchIconClick();
@@ -337,9 +338,8 @@ export default defineComponent({
this.animationActive = false;
},
onPlayIconClick(){
- this.closeModalsAndSettings();
+ this.closeModesAndSettings();
this.animationActive = true;
- this.setLastFocused(null);
this.autoAction();
},
autoAction(){
@@ -441,7 +441,7 @@ export default defineComponent({
}
},
onHelpIconClick(){
- this.closeModalsAndSettings();
+ this.closeModesAndSettings();
this.helpOpen = true;
},
onHelpModalClose(){