Mercurial > code > home > repos > light9
changeset 1388:2e47c1b4141a
write effectClass on note
Ignore-this: 8cf7dea1307a47f7659c65b8da00e9ea
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Thu, 09 Jun 2016 06:54:12 +0000 |
parents | 26fabcf3a0a8 |
children | 247c193ed5af |
files | light9/web/timeline/timeline-elements.html light9/web/timeline/timeline.coffee |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/web/timeline/timeline-elements.html Thu Jun 09 06:40:53 2016 +0000 +++ b/light9/web/timeline/timeline-elements.html Thu Jun 09 06:54:12 2016 +0000 @@ -155,6 +155,7 @@ <g id="timeAxis" transform="translate(0,40)"></g> <g id="mouse"></g> <g id="notes"></g> + <g id="noteLabels"></g> <g id="connectors"></g> <g id="cursor"> <path id="cursor1" style="fill:none; stroke:#ff0303; stroke-width:1.5; stroke-linecap:butt;" />
--- a/light9/web/timeline/timeline.coffee Thu Jun 09 06:40:53 2016 +0000 +++ b/light9/web/timeline/timeline.coffee Thu Jun 09 06:54:12 2016 +0000 @@ -330,7 +330,8 @@ screenPos = (pt) => $V([@zoomInX(pt.e(1)), @offsetTop + (1 - pt.e(2)) * @offsetHeight]) - @dia.setNote(@uri, (screenPos(pt) for pt in worldPts)) + @dia.setNote(@uri, (screenPos(pt) for pt in worldPts), + @graph.uriValue(@uri, U(':effectClass'))) catch e log("during resize of #{@uri}: #{@e}") @@ -469,10 +470,15 @@ elem.remove() delete @elemById[uri] - setNote: (uri, curvePts) -> + setNote: (uri, curvePts, effectLabel) -> elem = @getOrCreateElem(uri, 'notes', 'path', {style:"fill:#53774b; stroke:#000000; stroke-width:1.5;"}) elem.setAttribute('d', svgPathFromPoints(curvePts)) + elem = @getOrCreateElem(uri+'/label', 'noteLabels', 'text', {style: "font-size:13px;line-height:125%;font-family:'Verana Sans';text-align:start;text-anchor:start;fill:#000000;"}) + elem.setAttribute('x', curvePts[0].e(1)+20) + elem.setAttribute('y', curvePts[0].e(2)-10) + elem.innerHTML = effectLabel; + setCursor: (y1, h1, y2, h2, fullZoomX, zoomInX, cursor) -> @cursorPath = top: @querySelector('#cursor1')