aboutsummaryrefslogtreecommitdiff
path: root/src/components/Tile.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-06-27 01:41:18 +1000
committerTerry Truong <terry06890@gmail.com>2022-06-27 01:41:18 +1000
commit4a9e686816507c36ec80b1a133a981089d7cca70 (patch)
treee543f136db59b649b44895e0a77431a25b069e8f /src/components/Tile.vue
parent256ef11c99fb8a2f8b0a789cc2ae4416ef7d7733 (diff)
Clean up code in SettingsModal
Add reduced-versions of developer options Add input-range value indicators
Diffstat (limited to 'src/components/Tile.vue')
-rw-r--r--src/components/Tile.vue10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/Tile.vue b/src/components/Tile.vue
index 9983749..608938e 100644
--- a/src/components/Tile.vue
+++ b/src/components/Tile.vue
@@ -327,7 +327,7 @@ export default defineComponent({
watch: {
// For setting transition state (allows external triggering, like via search and auto-mode)
pos: {
- handler(newVal, oldVal){
+ handler(newVal: [number, number], oldVal: [number, number]){
let valChanged = newVal[0] != oldVal[0] || newVal[1] != oldVal[1];
if (valChanged && this.uiOpts.transitionDuration > 100 && !this.inTransition){
this.inTransition = true;
@@ -336,7 +336,7 @@ export default defineComponent({
deep: true,
},
dims: {
- handler(newVal, oldVal){
+ handler(newVal: [number, number], oldVal: [number, number]){
let valChanged = newVal[0] != oldVal[0] || newVal[1] != oldVal[1];
if (valChanged && this.uiOpts.transitionDuration > 100 && !this.inTransition){
this.inTransition = true;
@@ -349,7 +349,7 @@ export default defineComponent({
this.triggerAnimation(this.isLeaf ? 'animate-expand-shrink' : 'animate-shrink-expand');
},
// Scroll to focused child if overflownRoot
- hasFocusedChild(newVal, oldVal){
+ hasFocusedChild(newVal: boolean, oldVal: boolean){
if (newVal && this.isOverflownRoot){
let focusedChild = this.layoutNode.children.find(n => n.hasFocus)!
let bottomY = focusedChild.pos[1] + focusedChild.dims[1] + this.lytOpts.tileSpacing;
@@ -358,14 +358,14 @@ export default defineComponent({
}
},
// Allow overflow temporarily after being unhidden
- hidden(newVal, oldVal){
+ hidden(newVal: boolean, oldVal: boolean){
if (oldVal && !newVal){
this.justUnhidden = true;
setTimeout(() => {this.justUnhidden = false;}, this.uiOpts.transitionDuration);
}
},
// Used to 'flash' the tile when focused
- hasFocus(newVal, oldVal){
+ hasFocus(newVal: boolean, oldVal: boolean){
if (newVal != oldVal && newVal){
this.inFlash = true;
setTimeout(() => {this.inFlash = false;}, this.uiOpts.transitionDuration);