diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-09-14 20:47:07 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-09-14 20:47:07 +1000 |
| commit | 362b03b2259c8f69ac43b26f5552d66226b4e612 (patch) | |
| tree | c38dc60a5e3b6334bcbfa992cd2c5a1503c7745c | |
| parent | 8b5538e0a55a83b1ff190cd5ad689827777e73a7 (diff) | |
Add missing constraint for auto-mode move-down
| -rw-r--r-- | src/App.vue | 5 | ||||
| -rw-r--r-- | src/store.ts | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue index 9e8bd8f..f7ae8c8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -723,6 +723,9 @@ async function autoAction(){ if (node == activeRoot.value || node.parent!.children.length == 1){ actionWeights['move across'] = 0; } + if (node.children.length == 0 || !layoutMap.value.has(node.children[0].name)){ + actionWeights['move down'] = 0; + } if (node == activeRoot.value){ actionWeights['move up'] = 0; } @@ -794,7 +797,7 @@ async function autoAction(){ return; } autoPrevActionFail.value = !success; - setTimeout(autoAction, store.transitionDuration + store.autoActionDelay); + setTimeout(autoAction, action == null ? 0 : store.transitionDuration + store.autoActionDelay); } } function onAutoClose(){ diff --git a/src/store.ts b/src/store.ts index d4f87d3..b882101 100644 --- a/src/store.ts +++ b/src/store.ts @@ -122,7 +122,7 @@ function getDefaultState(): StoreState { clickHoldDuration: 400, // ms transitionDuration: 300, // ms animationDelay: 100, // ms - autoActionDelay: 1000, // ms + autoActionDelay: 500, // ms // Other disableShortcuts: false, autoHide: true, |
