From 52179c6e4564040ec013f873e3a38b5e2acb5fae Mon Sep 17 00:00:00 2001 From: Nikan Dalvand Date: Fri, 2 Aug 2019 20:20:31 +0430 Subject: [PATCH] Fixed the wave animation and added closing animation to it --- src/renderer/layouts/PlayerBar.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/renderer/layouts/PlayerBar.vue b/src/renderer/layouts/PlayerBar.vue index 3883973..45daa45 100644 --- a/src/renderer/layouts/PlayerBar.vue +++ b/src/renderer/layouts/PlayerBar.vue @@ -171,10 +171,20 @@ export default { }) }, playNext () { - this.playQueueItem(this.currentlyPlaying + 1) + this.wavesurfer.container.style['height'] = '0%' + let map = this.wavesurfer.minimap.drawer.container + map.style['height'] = '0%' + window.setTimeout(() => { + this.playQueueItem(this.currentlyPlaying + 1) + }, 500) }, playPrevious () { - this.playQueueItem(this.currentlyPlaying - 1) + this.wavesurfer.container.style['height'] = '0%' + let map = this.wavesurfer.minimap.drawer.container + map.style['height'] = '0%' + window.setTimeout(() => { + this.playQueueItem(this.currentlyPlaying - 1) + }, 500) }, play () { this.wavesurfer.play() @@ -250,7 +260,7 @@ section.player top: 0 bottom: 0 margin: auto - transition: height 500ms ease ease + transition: height 500ms ease height: 0px width: 100% z-index: