# HG changeset patch # User Drew Perttula # Date 1465107781 0 # Node ID 16aa26b7d68557209f0657052ddc99f8c6a9c43b # Parent 9476e97b57fba38e9cdfdde21be42698fe699032 timeline audio loads the current song img Ignore-this: 8c9afdda65323ecd0b48553dc13b1db5 diff -r 9476e97b57fb -r 16aa26b7d685 light9/web/graph.coffee --- a/light9/web/graph.coffee Sun Jun 05 05:36:00 2016 +0000 +++ b/light9/web/graph.coffee Sun Jun 05 06:23:01 2016 +0000 @@ -275,19 +275,23 @@ unsubscribe: (subscription) -> @_watchers.unsubscribe(subscription) - - floatValue: (s, p) -> + _singleValue: (s, p) -> quads = @graph.findByIRI(s, p) switch quads.length - when 0 then throw new Error("no value for "+s+" "+p) + when 0 + throw new Error("no value for "+s+" "+p) when 1 obj = quads[0].object - return parseFloat(N3.Util.getLiteralValue(obj)) + return N3.Util.getLiteralValue(obj) else throw new Error("too many values: " + JSON.stringify(quads)) + + floatValue: (s, p) -> + parseFloat(@_singleValue(s, p)) stringValue: (s, p) -> - + @_singleValue(s, p) + uriValue: (s, p) -> objects: (s, p) -> diff -r 9476e97b57fb -r 16aa26b7d685 light9/web/light9-timeline-audio.html --- a/light9/web/light9-timeline-audio.html Sun Jun 05 05:36:00 2016 +0000 +++ b/light9/web/light9-timeline-audio.html Sun Jun 05 06:23:01 2016 +0000 @@ -21,22 +21,47 @@ }
-