Changeset - 6b535f723a45
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 8 years ago 2017-06-11 00:23:00
drewp@bigasterisk.com
fix effect resources in notes
Ignore-this: 9ad7cbd26bdbaa558206b84b405f2fb3
3 files changed with 4 insertions and 22 deletions:
0 comments (0 inline, 0 general)
light9/web/edit-choice.coffee
Show inline comments
 
@@ -44,11 +44,6 @@ Polymer
 
    properties:
 
        graph: {type: Object, notify: true},
 
        uri: {type: String, notify: true},
 
        label: {type: String, notify: true}
 

	
 
    observers: [
 
      'gotGraph(graph, uri)'
 
      ]
 

	
 
    ready: ->
 
      @uri = null
 
@@ -56,15 +51,6 @@ Polymer
 
        @uri=uri
 
        @updateLabel()
 

	
 
    gotGraph: ->
 
      @graph.runHandler(@updateLabel.bind(@), "edit-choice #{@uri}")
 
        
 
    updateLabel: ->
 
      @label = try
 
          @graph.stringValue(@uri, RDFS + 'label')
 
        catch
 
          @uri
 

	
 
    unlink: ->
 
      @uri = null
 

	
light9/web/timeline/timeline-elements.html
Show inline comments
 
@@ -243,6 +243,7 @@
 
                                       selection="{{selection}}"
 
                                       song="{{song}}"
 
                                       uri="{{uri}}"
 
                                       effect="{{effect}}"
 
    >
 
    </light9-timeline-note-inline-attrs>
 
  </template>
 
@@ -282,7 +283,7 @@
 
    <div id="top" style$="left: [[rect.left]]px; top: [[rect.top]]px; width: [[rect.width]]px; height: [[rect.height]]px; display: [[rect.display]]">
 
      <div>note [[noteLabel]] <button on-click="onDel">del</button></div>
 
      <table>
 
        <tr><th>effect:</th><td><edit-choice uri="{{effect}}" label="{{effectLabel}}"></edit-choice></td></tr>
 
        <tr><th>effect:</th><td><edit-choice graph="{{graph}}" uri="{{effect}}"></edit-choice></td></tr>
 
        <tr><th>colorScale:</th><td>
 
          <light9-color-picker color="{{colorScale}}"></light9-color-picker>
 
        </td></tr>
light9/web/timeline/timeline.coffee
Show inline comments
 
@@ -400,13 +400,13 @@ Polymer
 
    selection: { type: Object, notify: true }
 
  observers: [
 
    'onGraph(graph, dia, setAdjuster, song, zoomInX)'
 
    'observedUpdate(song, rowIndex)'
 
    'observedUpdate(graph, song, rowIndex)'
 
    'onZoom(zoomInX)'
 
    ]
 
  onGraph: ->
 
    @graph.runHandler(@update.bind(@), "row notes #{@rowIndex}")
 

	
 
  observedUpdate: (song, rowIndex) ->
 
  observedUpdate: (graph, song, rowIndex) ->
 
    @update() # old behavior
 
    #@graph.runHandler(@update.bind(@), "row notes #{@rowIndex}")
 

	
 
@@ -632,7 +632,6 @@ Polymer
 
    uri: { type: String, notify: true }  # the Note
 
    rect: { type: Object, notify: true }
 
    effect: { type: String, notify: true }
 
    effectLabel: { type: String, notify: true }
 
    colorScale: { type: String, notify: true }
 
    noteLabel: { type: String, notify: true }
 
    selection: { type: Object, notify: true }
 
@@ -679,10 +678,6 @@ Polymer
 
    #console.time('attrs update')
 
    U = (x) => @graph.Uri(x)
 
    @effect = @graph.uriValue(@uri, U(':effectClass'))
 
    try
 
      @effectLabel = @graph.stringValue(@effect, U('rdfs:label'))
 
    catch
 
      @effectLabel = @effect.replace(/.*\//, '')
 
    @noteLabel = @uri.replace(/.*\//, '')
 

	
 
    existingColorScaleSetting = null
0 comments (0 inline, 0 general)