aboutsummaryrefslogtreecommitdiff
path: root/src/components/SearchModal.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-15 12:25:08 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-15 12:25:08 +1100
commit356ffa2250c66c442cfa8c4e638ca53926396a65 (patch)
treecbfd3d2229df6a1b3c0e4837bcc7aff5c624c8a5 /src/components/SearchModal.vue
parente045f6461b5ceabb285b00fb9db0050a3d1f9d8d (diff)
Add visual indication of pan/zoom failure
Add tick display data to Tick objects Add 'movement fail' divs Add animateWithClass() utility function Add animate-show-then-fade class
Diffstat (limited to 'src/components/SearchModal.vue')
-rw-r--r--src/components/SearchModal.vue10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue
index dd387e1..ade86be 100644
--- a/src/components/SearchModal.vue
+++ b/src/components/SearchModal.vue
@@ -31,7 +31,7 @@
import {ref, computed, onMounted, PropType} from 'vue';
import SearchIcon from './icon/SearchIcon.vue';
import InfoIcon from './icon/InfoIcon.vue';
-import {HistEvent, queryServer, EventInfoJson, jsonToEventInfo, SuggResponseJson} from '../lib';
+import {HistEvent, queryServer, EventInfoJson, jsonToEventInfo, SuggResponseJson, animateWithClass} from '../lib';
import {useStore} from '../store';
import {RBTree} from '../rbtree';
@@ -187,12 +187,8 @@ async function resolveSearch(eventTitle: string){
return;
}
emit('search', eventInfo.event);
- } else {
- // Trigger failure animation
- let input = inputRef.value!;
- input.classList.remove('animate-red-then-fade');
- input.offsetWidth; // Triggers reflow
- input.classList.add('animate-red-then-fade');
+ } else { // Trigger failure animation
+ animateWithClass(inputRef.value!, 'animate-red-then-fade');
}
}