# HG changeset patch # User Drew Perttula # Date 1465029971 0 # Node ID 1310a807de06b8bf78c6bdf4a5f35410903febb8 # Parent 14b8e874e89b00ce2d71beb04526875df81ef16a show seconds on the zooming area Ignore-this: a6373dc818bbba9ba2fc535c5e98d1fa diff -r 14b8e874e89b -r 1310a807de06 light9/web/timeline-elements.html --- a/light9/web/timeline-elements.html Sat Jun 04 08:45:16 2016 +0000 +++ b/light9/web/timeline-elements.html Sat Jun 04 08:46:11 2016 +0000 @@ -80,7 +80,7 @@
- + @@ -142,6 +142,7 @@ y="631.3988" id="text4290" sodipodi:linespacing="125%" >spotchase + @@ -159,15 +160,14 @@ - diff -r 14b8e874e89b -r 1310a807de06 light9/web/timeline.coffee --- a/light9/web/timeline.coffee Sat Jun 04 08:45:16 2016 +0000 +++ b/light9/web/timeline.coffee Sat Jun 04 08:46:11 2016 +0000 @@ -29,6 +29,7 @@ ko.computed => @fullZoomX = d3.scaleLinear().domain([0, @viewState.zoomSpec.duration()]).range([0, @width()]) @zoomInX = d3.scaleLinear().domain([@viewState.zoomSpec.t1(), @viewState.zoomSpec.t2()]).range([0, @width()]) + @dia.setTimeAxis(@width(), @$.zoomed.$.audio.offsetTop, @zoomInX) @$.adjusters.updateAllCoords() animCursor = () => @@ -116,6 +117,12 @@ return [left, right, pan] Polymer + is: "light9-timeline-time-axis", + # for now since it's just one line calling dia, + # light9-timeline-editor does our drawing work. + + +Polymer is: "light9-timeline-adjusters" properties: adjs: { type: Array }, @@ -191,6 +198,11 @@ window.setNote = @setNote.bind(this) window.setMouse = @setMouse.bind(this) + setTimeAxis: (width, yTop, scale) -> + pxPerTick = 50 + axis = d3.axisTop(scale).ticks(width / pxPerTick) + d3.select(@$.timeAxis).attr('transform', 'translate(0,'+yTop+')').call(axis) + setMouse: (pos) -> elem = @getOrCreateElem('mouse-x', 'mouse', 'path', {style: "fill:none;stroke:#333;stroke-width:0.5;"}) elem.setAttribute('d', svgPathFromPoints([[-999, pos.e(2)], [999, pos.e(2)]]))