Changeset - da8f36f809f1
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 9 years ago 2016-06-11 17:18:05
drewp@bigasterisk.com
shorten note labels
Ignore-this: d84baceec8da54ec2c9e6fb6e2e238b8
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/web/timeline/timeline.coffee
Show inline comments
 
@@ -345,50 +345,50 @@ Polymer
 
          }))
 

	
 
          for pointNum in [0, 2, 3]
 
            @setAdjuster(@uri+'/p'+pointNum, adj = new AdjustableFloatObject({
 
              graph: @graph
 
              subj: worldPts[pointNum].uri
 
              pred: @graph.Uri(':time')
 
              ctx: @graph.Uri(@song)
 
              getTargetPosForValue: (value) => $V([@zoomInX(value), 600])
 
              getValueForPos: (pos) =>
 
                origin = @graph.floatValue(@uri, U(':originTime'))
 
                (@zoomInX.invert(pos.e(1)) - origin)
 
              getSuggestedTargetOffset: () => $V([0, -80])
 
            }))
 
            adj._getValue = (=>
 
              # note: don't use originTime from the closure- we need the
 
              # graph dependency
 
              adj._currentValue + @graph.floatValue(@uri, U(':originTime'))
 
              )
 
            console.log(adj)
 
          
 
      screenPos = (pt) =>
 
        $V([@zoomInX(pt.e(1)), @offsetTop + (1 - pt.e(2)) * @offsetHeight])
 

	
 
      @dia.setNote(@uri, (screenPos(pt) for pt in worldPts),
 
                   @graph.uriValue(@uri, U(':effectClass')))
 
      label = @graph.uriValue(@uri, U(':effectClass')).replace(/.*\//, '')
 
      @dia.setNote(@uri, (screenPos(pt) for pt in worldPts), label)
 

	
 
    catch e
 
      log("during resize of #{@uri}: #{@e}")
 

	
 
Polymer
 
  is: "light9-timeline-adjusters"
 
  properties:
 
    adjs: { type: Object, notify: true }, # adjId: Adjustable
 
    dia: { type: Object }
 

	
 
  ready: ->
 
    @adjs = {}
 
    
 
  setAdjuster: (adjId, adjustable) ->
 
    # callers register/unregister the Adjustables they want us
 
    # to make adjuster elements for. Caller invents adjId.
 
    adjustable.id = adjId
 
    if not @adjs[adjId] or not adjustable?
 
      @adjs[adjId] = adjustable
 
      @debounce('adjsChanged', @adjsChanged.bind(@), 1)
 
    
 
  adjsChanged: ->
 

	
 
    added = removed = 0
0 comments (0 inline, 0 general)