Changeset - e82a8a48120c
[Not reviewed]
default
0 2 0
Drew Perttula - 7 years ago 2018-05-27 01:16:49
drewp@bigasterisk.com
update note drawings correctly. rerender less.
Ignore-this: f673b26f919d98b5ee18c1dd94a877f2
2 files changed with 7 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/web/timeline/adjusters.coffee
Show inline comments
 
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: ->
light9/web/timeline/timeline.coffee
Show inline comments
 
@@ -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}")
0 comments (0 inline, 0 general)