Changeset - ab025bf6c3df
[Not reviewed]
default
0 2 0
Drew Perttula - 8 years ago 2017-06-07 07:41:06
drewp@bigasterisk.com
let svg receive mouse events in prep for selection support
Ignore-this: a4890b7effd0aa31868eb161f71a49fb
2 files changed with 6 insertions and 5 deletions:
0 comments (0 inline, 0 general)
light9/web/timeline/timeline-elements.html
Show inline comments
 
@@ -136,12 +136,10 @@
 
  <template>
 
    <style>
 
     :host {
 
         pointer-events: none;
 
     }
 
     svg {
 
         width: 100%;
 
         height: 100%;
 
         pointer-events: none;
 
     }
 
    </style>
 
    <svg xmlns="http://www.w3.org/2000/svg"
light9/web/timeline/timeline.coffee
Show inline comments
 
@@ -96,7 +96,7 @@ Polymer
 

	
 
    @trackMouse()
 
    @bindKeys()
 
    @bindWheelZoom()
 
    @bindWheelZoom(@dia.querySelector('svg'))
 
    @forwardMouseEventsToAdjustersCanvas()
 

	
 
    @makeZoomAdjs()
 
@@ -155,8 +155,8 @@ Polymer
 
  latestMouseTime: ->
 
    @zoomInX.invert(@viewState.mouse.pos().e(1))
 

	
 
  bindWheelZoom: ->
 
    @$.zoomed.addEventListener 'mousewheel', (ev) =>
 
  bindWheelZoom: (elem) ->
 
    elem.addEventListener 'mousewheel', (ev) =>
 
      zs = @viewState.zoomSpec
 

	
 
      center = @latestMouseTime()
 
@@ -896,6 +896,9 @@ Polymer
 
  ready: ->
 
    @elemById = {}
 

	
 
  attached: ->
 
    @querySelector('svg').add
 

	
 
  setTimeAxis: (width, yTop, scale) ->
 
    pxPerTick = 50
 
    axis = d3.axisTop(scale).ticks(width / pxPerTick)
0 comments (0 inline, 0 general)