Changeset - a6045f11198d
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 6 years ago 2019-06-10 23:22:06
drewp@bigasterisk.com
don't show a misleading TL cursor when we're viewing a song that's not the playing one
Ignore-this: 33928b4331aa09f2191b6d45e4e163a
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/web/timeline/timeline.coffee
Show inline comments
 
@@ -109,13 +109,13 @@ coffeeElementSetup(class TimelineEditor 
 
    songPlaying: {type: Boolean, notify: true}
 
    selection: {type: Object, notify: true}
 
  @getter_observers: [
 
    '_onSong(playerSong, followPlayerSong)',
 
    '_onGraph(graph)',
 
    '_onSongDuration(songDuration, viewState)',
 
    '_onSongTime(songTime, viewState)',
 
    '_onSongTime(song, playerSong, songTime, viewState)',
 
    '_onSetAdjuster(setAdjuster)',
 
  ]
 
  constructor: ->
 
    super()
 
    @viewState = new ViewState()
 
    window.viewState = @viewState
 
@@ -154,13 +154,16 @@ coffeeElementSetup(class TimelineEditor 
 
    @viewState.audioY(@$.audio.offsetTop)
 
    @viewState.audioH(@$.audio.offsetHeight)
 
    if @$.zoomed?.$?.time?
 
      @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) ->
 
    d = 700 if d < 1 # bug is that asco isn't giving duration, but 0 makes the scale corrupt
 
    @viewState.zoomSpec.duration(d)
 

	
0 comments (0 inline, 0 general)