Mercurial > code > home > repos > light9
changeset 1663:6b535f723a45
fix effect resources in notes
Ignore-this: 9ad7cbd26bdbaa558206b84b405f2fb3
author | drewp@bigasterisk.com |
---|---|
date | Sun, 11 Jun 2017 00:23:00 +0000 |
parents | 4272e727438e |
children | a57bf87efd34 |
files | light9/web/edit-choice.coffee light9/web/timeline/timeline-elements.html light9/web/timeline/timeline.coffee |
diffstat | 3 files changed, 4 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/web/edit-choice.coffee Sun Jun 11 00:22:23 2017 +0000 +++ b/light9/web/edit-choice.coffee Sun Jun 11 00:23:00 2017 +0000 @@ -44,11 +44,6 @@ 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 @@ @uri=uri @updateLabel() - gotGraph: -> - @graph.runHandler(@updateLabel.bind(@), "edit-choice #{@uri}") - - updateLabel: -> - @label = try - @graph.stringValue(@uri, RDFS + 'label') - catch - @uri - unlink: -> @uri = null
--- a/light9/web/timeline/timeline-elements.html Sun Jun 11 00:22:23 2017 +0000 +++ b/light9/web/timeline/timeline-elements.html Sun Jun 11 00:23:00 2017 +0000 @@ -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>
--- a/light9/web/timeline/timeline.coffee Sun Jun 11 00:22:23 2017 +0000 +++ b/light9/web/timeline/timeline.coffee Sun Jun 11 00:23:00 2017 +0000 @@ -400,13 +400,13 @@ 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 @@ 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 @@ #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