diff --git a/light9/web/timeline/adjusters.coffee b/light9/web/timeline/adjusters.coffee --- a/light9/web/timeline/adjusters.coffee +++ b/light9/web/timeline/adjusters.coffee @@ -1,7 +1,6 @@ log = console.log Drawing = window.Drawing - coffeeElementSetup(class AdjustersCanvas extends Polymer.mixinBehaviors([Polymer.IronResizableBehavior], Polymer.Element) @is: 'light9-adjusters-canvas' @getter_properties: @@ -11,7 +10,7 @@ coffeeElementSetup(class AdjustersCanvas ] constructor: -> super() - @redraw = _.throttle(@_throttledRedraw.bind(@), 30, {leading: false}) + @redraw = _.throttle(@_throttledRedraw.bind(@), 60, {leading: false}) @adjs = {} ready: -> diff --git a/light9/web/timeline/timeline.coffee b/light9/web/timeline/timeline.coffee --- a/light9/web/timeline/timeline.coffee +++ b/light9/web/timeline/timeline.coffee @@ -306,6 +306,7 @@ coffeeElementSetup(class TimeZoomed exte antialias: true, forceCanvas: true, }) + @dirty = _.debounce((() => @renderer.render(@stage)), 10) ready: -> super.ready() @@ -328,11 +329,14 @@ coffeeElementSetup(class TimeZoomed exte @renderer.resize(@clientWidth, @clientHeight + @viewState.rowsY()) - @renderer.render(@stage) + @dirty() _onGraph: (graph, setAdjuster, song, viewState, project)-> return unless @song # polymer will call again @graph.runHandler(@gatherNotes.bind(@), 'zoom notes') + + noteDirty: -> + @dirty() onZoom: -> updateZoomFlattened = -> @@ -501,6 +505,7 @@ class Note curveWidthCalc = () => @project.curveWidth(worldPts) @_updateAdjusters(screenPts, worldPts, curveWidthCalc, yForV, @song) @_updateInlineAttrs(screenPts) + @parentElem.noteDirty() onUri: -> @graph.runHandler(@update.bind(@), "note updates #{@uri}")