Mercurial > code > home > repos > light9
changeset 1333:b355f8089950
move row & note elements to coffee
Ignore-this: fa6a3b252138df332e1eb166353509ff
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sat, 04 Jun 2016 08:52:38 +0000 |
parents | 1310a807de06 |
children | 8406a9fbeb9d |
files | light9/web/timeline-elements.html light9/web/timeline.coffee |
diffstat | 2 files changed, 14 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/web/timeline-elements.html Sat Jun 04 08:46:11 2016 +0000 +++ b/light9/web/timeline-elements.html Sat Jun 04 08:52:38 2016 +0000 @@ -68,7 +68,6 @@ display: flex; flex-direction: column; height: 100%; - } light9-timeline-audio { width: 100%; @@ -183,17 +182,6 @@ <light9-timeline-note></light9-timeline-note> </template> </template> - <script> - Polymer({ - is: "light9-timeline-graph-row", - behaviors: [ - Polymer.IronResizableBehavior - ], - properties: { - - } - }); - </script> </dom-module> <!-- One trapezoid note shape in a row. @@ -211,26 +199,6 @@ </style> <light9-timeline-note-inline-attrs></light9-timeline-note-inline-attrs> </template> - <script> - window.xserial = 0; - Polymer({ - is: "light9-timeline-note", - behaviors: [ - Polymer.IronResizableBehavior - ], - listeners: { - 'iron-resize': '_onIronResize' - }, - properties: { - }, - - _onIronResize: function() { - - setNote('myuri', 60 + 150 * (window.xserial++), 180, this.offsetTop, this.offsetTop + this.offsetHeight); - - } - }); - </script> </dom-module> <!-- All the adjusters you can edit or select. @@ -242,10 +210,7 @@ <dom-module id="light9-timeline-adjusters"> <template> <style> - :host { - } </style> - <template is="dom-repeat" items="{{adjs}}"> <light9-timeline-adjuster dia="{{dia}}" adj="{{item}}"></light9-timeline-adjuster> </template>
--- a/light9/web/timeline.coffee Sat Jun 04 08:46:11 2016 +0000 +++ b/light9/web/timeline.coffee Sat Jun 04 08:52:38 2016 +0000 @@ -121,6 +121,20 @@ # for now since it's just one line calling dia, # light9-timeline-editor does our drawing work. +Polymer + is: 'light9-timeline-graph-row' + behaviors: [ Polymer.IronResizableBehavior ] + properties: {} + + +window.xserial = 0 +Polymer + is: 'light9-timeline-note' + behaviors: [ Polymer.IronResizableBehavior ] + listeners: 'iron-resize': '_onIronResize' + properties: {} + _onIronResize: -> + setNote 'myuri', 60 + 150 * window.xserial++, 180, @offsetTop, @offsetTop + @offsetHeight Polymer is: "light9-timeline-adjusters"