Changeset - 901767febb47
[Not reviewed]
default
0 3 0
Drew Perttula - 8 years ago 2017-05-30 08:39:05
drewp@bigasterisk.com
bind 'this' in U shorthand.
Ignore-this: 9bfa9a1a230bdc5157da07b3434c50c4

worked at runtime, failed during debugging
3 files changed with 12 insertions and 12 deletions:
0 comments (0 inline, 0 general)
light9/web/live/live.coffee
Show inline comments
 
@@ -71,7 +71,7 @@ Polymer
 
    uriName = @newEffectName.replace(/[^a-zA-Z0-9_]/g, '')
 
    return if not uriName.length
 

	
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 

	
 
    effectUri = U(":effect") + "/#{uriName}"
 
    ctx = U("http://light9.bigasterisk.com/show/dance2017/effect/#{uriName}")
 
@@ -113,7 +113,7 @@ Polymer
 
      llc.clear()
 
    
 
  update: ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 

	
 
    @set('devices', [])
 
    for dc in _.sortBy(@graph.subjects(U('rdf:type'), U(':DeviceClass')))
light9/web/paint/paint-elements.coffee
Show inline comments
 
@@ -151,7 +151,7 @@ Polymer
 
  onSubj: (graph, @subj) ->
 
    graph.runHandler(@loadAttrs.bind(@), "loadAttrs #{@subj}")
 
  loadAttrs: ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 
    @attrs = []
 
    for s in @graph.objects(U(@subj), U(':setting'))
 
      attr = @graph.uriValue(s, U(':deviceAttr'))
light9/web/timeline/timeline.coffee
Show inline comments
 
@@ -279,7 +279,7 @@ Polymer
 
    setupDrop(@, @$.rows, root, @onDrop.bind(@))
 

	
 
  onDrop: (effect, pos) ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 

	
 
    # we could probably accept some initial overrides right on the
 
    # effect uri, maybe as query params
 
@@ -295,7 +295,7 @@ Polymer
 
    @makeNewNote(effect, dropTime)
 

	
 
  makeEffect: (uri) ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 
    effect = U(uri + '/effect')
 
    quad = (s, p, o) => {subject: s, predicate: p, object: o, graph: effect}
 
    
 
@@ -322,7 +322,7 @@ Polymer
 
    return effect
 
        
 
  makeNewNote: (effect, dropTime) ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 
    quad = (s, p, o) => {subject: s, predicate: p, object: o, graph: @song}
 
      
 
    newNote = @graph.nextNumberedResource("#{@song}/n")
 
@@ -379,7 +379,7 @@ Polymer
 
  onGraph: ->
 
    @graph.runHandler(@update.bind(@), "row notes #{@rowIndex}")
 
  update: (patch) ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 

	
 
    notesForThisRow = []
 
    i = 0
 
@@ -473,7 +473,7 @@ Polymer
 
  updateDisplay: ->
 
      
 
    # update our note DOM and SVG elements based on the graph
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 

	
 
    yForV = (v) => @offsetTop + (1 - v) * @offsetHeight
 

	
 
@@ -484,7 +484,7 @@ Polymer
 
        @updateStrengthCurveEtc(originTime, curve, yForV, effect)
 
        
 
  updateStrengthCurveEtc: (originTime, curve, yForV, effect) ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 
    [@pointUris, @worldPts] = getCurvePoints(@graph, curve, originTime) # (song time, value)
 

	
 
    curveWidth = =>
 
@@ -517,7 +517,7 @@ Polymer
 
    @makeCurveAdjusters(curveWidth, yForV, @worldPts)
 
    
 
  makeCurveAdjusters: (curveWidth, yForV, worldPts) ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 

	
 
    if true
 
      @adjusterIds[@uri+'/offset'] = true
 
@@ -579,7 +579,7 @@ Polymer
 
    'onColorScale(graph, uri, colorScale)'
 
    ]
 
  onColorScale: ->
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 
    if @colorScale == @colorScaleFromGraph
 
      return
 
      
 
@@ -602,7 +602,7 @@ Polymer
 
    
 
  update: ->
 
    console.time('attrs update')
 
    U = (x) -> @graph.Uri(x)
 
    U = (x) => @graph.Uri(x)
 
    @effect = @graph.uriValue(@uri, U(':effectClass'))
 
    @effectLabel = @graph.stringValue(@effect, U('rdfs:label')) or (@effect.replace(/.*\//, ''))
 
    @noteLabel = @uri.replace(/.*\//, '')
0 comments (0 inline, 0 general)