diff options
| author | QuarkPixel <m2462864403@gmail.com> | 2025-09-18 14:51:09 +0800 |
|---|---|---|
| committer | QuarkPixel <m2462864403@gmail.com> | 2025-09-18 14:51:09 +0800 |
| commit | 461b268e16f4b9369637da17afba1c814726b58f (patch) | |
| tree | 8cf87c72728fe53da1c3abe2c42dec5e82450e41 /src | |
| parent | 755f69bcbd80a0e2fd433a8ccd1427d856cda946 (diff) | |
fix: missing transition when closing
Diffstat (limited to 'src')
| -rw-r--r-- | src/shadow.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shadow.js b/src/shadow.js index 5435532..fd3c2f3 100644 --- a/src/shadow.js +++ b/src/shadow.js @@ -101,10 +101,12 @@ export default class Shadow { this.isOpen = false; this.element.classList.remove('open'); - this.original.style.visibility = 'visible'; - Animation.resetTransformMatrix(this.element); - setTimeout(() => this.destroyItself(), 300); + // Wait for animation to complete before showing original and destroying shadow + setTimeout(() => { + this.original.style.visibility = 'visible'; + this.destroyItself(); + }, config.transitionDuration); } placeItself() { |
