changeset 2019:a6045f11198d

don't show a misleading TL cursor when we're viewing a song that's not the playing one Ignore-this: 33928b4331aa09f2191b6d45e4e163a
author drewp@bigasterisk.com
date Mon, 10 Jun 2019 23:22:06 +0000
parents 5b157494a741
children dc742d72f8cb
files light9/web/timeline/timeline.coffee
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/timeline/timeline.coffee	Mon Jun 10 23:16:50 2019 +0000
+++ b/light9/web/timeline/timeline.coffee	Mon Jun 10 23:22:06 2019 +0000
@@ -112,7 +112,7 @@
     '_onSong(playerSong, followPlayerSong)',
     '_onGraph(graph)',
     '_onSongDuration(songDuration, viewState)',
-    '_onSongTime(songTime, viewState)',
+    '_onSongTime(song, playerSong, songTime, viewState)',
     '_onSetAdjuster(setAdjuster)',
   ]
   constructor: ->
@@ -157,7 +157,10 @@
       @viewState.zoomedTimeY(@$.zoomed.$.time.offsetTop)
       @viewState.zoomedTimeH(@$.zoomed.$.time.offsetHeight)
 
-  _onSongTime: (t) ->
+  _onSongTime: (song, playerSong, t) ->
+    if song != playerSong
+      @viewState.cursor.t(0)
+      return
     @viewState.cursor.t(t)
 
   _onSongDuration: (d) ->