Changeset - 7ec3eec60ea4
[Not reviewed]
default
0 1 0
Drew Perttula - 7 years ago 2018-05-24 06:04:12
drewp@bigasterisk.com
fix effects/ add buttons
Ignore-this: e2d02723ad54e53fd4a2c90040e0a4a7
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
light9/web/effects/effects.coffee
Show inline comments
 
@@ -5,30 +5,30 @@ Polymer
 
    effectClasses: { type: Array }
 
  ready: ->
 
    @graph.runHandler(@getClasses.bind(@), 'getClasses')
 

	
 
  getClasses: ->
 
    U = (x) => @graph.Uri(x)
 
    @effectClasses = _.sortBy(@graph.subjects(U('rdf:type'), U(':Effect')))
 

	
 
Polymer
 
  is: "light9-effect-class"
 
  properties: 
 
    graph: {type: Object}
 
    uri: {type: String}
 
    uri: {type: Object}
 
    
 
  onAdd: ->
 
    @$.songEffects.body = {drop: @uri}
 
    @$.songEffects.body = {drop: @uri.value}
 
    @$.songEffects.generateRequest()
 
    
 
  onMomentaryPress: ->
 
    @$.songEffects.body = {drop: @uri, event: 'start'}
 
    @$.songEffects.body = {drop: @uri.value, event: 'start'}
 
    @lastPress = @$.songEffects.generateRequest()
 
    @lastPress.completes.then (request) =>
 
      @lastMomentaryNote = request.response.note
 
      
 
  onMomentaryRelease: ->
 
    return unless @lastMomentaryNote
 
    @$.songEffects.body = {drop: @uri, note: @lastMomentaryNote}
 
    @$.songEffects.body = {drop: @uri.value, note: @lastMomentaryNote}
 
    @lastMomentaryNote = null
 
    @$.songEffects.generateRequest()
 
  
 
\ No newline at end of file
0 comments (0 inline, 0 general)