# HG changeset patch # User Drew Perttula # Date 2016-06-09 06:54:12 # Node ID 2e47c1b4141acaf17c0e67c28eb9a5a11e332902 # Parent 26fabcf3a0a8eb064d544e833b0afd5dde9a873a write effectClass on note Ignore-this: 8cf7dea1307a47f7659c65b8da00e9ea diff --git a/light9/web/timeline/timeline-elements.html b/light9/web/timeline/timeline-elements.html --- a/light9/web/timeline/timeline-elements.html +++ b/light9/web/timeline/timeline-elements.html @@ -155,6 +155,7 @@ background: rgba(126, 52, 245, 0.0784313 + diff --git a/light9/web/timeline/timeline.coffee b/light9/web/timeline/timeline.coffee --- a/light9/web/timeline/timeline.coffee +++ b/light9/web/timeline/timeline.coffee @@ -330,7 +330,8 @@ Polymer 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 @@ Polymer 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')