diff light9/web/timeline/inline-attrs.coffee @ 1743:92104dcd33e2

finish mouse event routing. inlineAttrs display again. Ignore-this: 5e5438f724a868ac12905a77e054d55
author Drew Perttula <drewp@bigasterisk.com>
date Sat, 19 May 2018 23:13:55 +0000
parents e06c2c105035
children b0d6ace1db5a
line wrap: on
line diff
--- a/light9/web/timeline/inline-attrs.coffee	Sat May 19 21:55:08 2018 +0000
+++ b/light9/web/timeline/inline-attrs.coffee	Sat May 19 23:13:55 2018 +0000
@@ -5,19 +5,27 @@
   @getter_properties:
     graph: { type: Object, notify: true }
     song: { type: String, notify: true }
-    uri: { type: String, notify: true }  # the Note
-    rect: { type: Object, notify: true }
-    effect: { type: String, notify: true }
+    config: { type: Object } # just for setup
+    uri: { type: Object, notify: true }  # the Note
+    effect: { type: Object, notify: true }
     colorScale: { type: String, notify: true }
     noteLabel: { type: String, notify: true }
     selection: { type: Object, notify: true }
   @getter_observers: [
     'addHandler(graph, uri)'
     'onColorScale(graph, uri, colorScale)'
+    '_onConfig(config)'
     ]
+  _onConfig: ->
+    @uri = @config.uri
+    for side in ['top', 'left', 'width', 'height']
+      @.style[side] = @config[side] + 'px'
+
   displayed: ->
     @querySelector('light9-color-picker').displayed()
+    
   onColorScale: ->
+    return
     U = (x) => @graph.Uri(x)
     if @colorScale == @colorScaleFromGraph
       return
@@ -48,6 +56,7 @@
       @graph.applyAndSendPatch(patch)
     
   addHandler: ->
+    return
     @graph.runHandler(@update.bind(@), "update inline attrs #{@uri}")
     
   update: ->