changeset 1744:ee3273dc1589

restore the code that updates zoomFlattened Ignore-this: cc276917562be6e3a3837f5dc728855a
author Drew Perttula <drewp@bigasterisk.com>
date Sat, 19 May 2018 23:35:42 +0000
parents 92104dcd33e2
children b0d6ace1db5a
files light9/web/timeline/timeline.coffee
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/timeline/timeline.coffee	Sat May 19 23:13:55 2018 +0000
+++ b/light9/web/timeline/timeline.coffee	Sat May 19 23:35:42 2018 +0000
@@ -295,6 +295,7 @@
     inlineAttrConfigs: { type: Array, value: [] } # only for inlineattrs that should be displayed
   @getter_observers: [
     '_onGraph(graph, setAdjuster, song, viewState, project)',
+    'onZoom(viewState)',
   ]
   constructor: ->
     super()
@@ -334,7 +335,12 @@
   _onGraph: (graph, setAdjuster, song, viewState, project)->
     return unless @song # polymer will call again
     @graph.runHandler(@gatherNotes.bind(@), 'zoom notes')
-    
+  onZoom: ->
+    updateZoomFlattened = ->
+      log('updateZoomFlattened')
+      @zoomFlattened = ko.toJS(@viewState.zoomSpec)
+    ko.computed(updateZoomFlattened.bind(@))
+
   gatherNotes: ->
     U = (x) => @graph.Uri(x)
     return unless @song?