diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-05-28 13:07:34 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-05-28 13:09:24 +1000 |
| commit | 4927ca46897ce8983f92572df12f4d6ea86ca376 (patch) | |
| tree | 2651e3e33b2d9b5e45a896c98b957fc2e8749a9f | |
| parent | afa1cae73c3df3ab099ca718c2db8621d26aac4b (diff) | |
Set visible-overflow on just-unhidden tiles
| -rw-r--r-- | src/components/Tile.vue | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/Tile.vue b/src/components/Tile.vue index b53abee..59e0839 100644 --- a/src/components/Tile.vue +++ b/src/components/Tile.vue @@ -32,6 +32,7 @@ export default defineComponent({ clickHoldTimer: 0, // Used to recognise click-and-hold events scrollOffset: 0, // Used to track scroll offset when displaying with overflow pendingScrollHdlr: 0, + justUnhidden: false, }; }, computed: { @@ -122,7 +123,8 @@ export default defineComponent({ transitionProperty: 'left, top, width, height, visibility', transitionTimingFunction: 'ease-out', zIndex: this.inTransition && this.wasClicked ? '1' : '0', - overflow: this.inTransition && !this.isLeaf && !this.hasExpanded ? 'hidden' : 'visible', + overflow: (this.inTransition && !this.isLeaf && !this.hasExpanded && !this.justUnhidden) ? + 'hidden' : 'visible', // CSS variables '--nonleafBgColor': this.nonleafBgColor, '--tileSpacing': this.lytOpts.tileSpacing + 'px', @@ -310,6 +312,9 @@ export default defineComponent({ failFlag(){ return this.layoutNode.failFlag; }, + hidden(){ + return this.layoutNode.hidden; + }, }, watch: { // For setting transition state (can be triggered externally, like via search and auto-mode) @@ -344,6 +349,13 @@ export default defineComponent({ this.$el.scrollTop = scrollTop; } }, + // + hidden(newVal, oldVal){ + if (oldVal && !newVal){ + this.justUnhidden = true; + setTimeout(() => {this.justUnhidden = false;}, this.uiOpts.tileChgDuration); + } + }, }, methods: { // Click handling |
