Skip to content
Permalink
Browse files

Manual click test, allow event capturing

  • Loading branch information
Koen Bok
Koen Bok committed Dec 29, 2015
1 parent 06b2cbb commit d8ac785c312029024b4062f65116a2e56e3cabd1
Showing with 5 additions and 18 deletions.
  1. +2 −2 framer/DOMEventManager.coffee
  2. +3 −16 test/studio/ScrollComponentBlockClick.framer/app.coffee
@@ -9,9 +9,9 @@ class DOMEventManagerElement extends EventEmitter

constructor: (@element) ->

addListener: (eventName, listener) ->
addListener: (eventName, listener, capture=false) ->
super(eventName, listener)
@element.addEventListener(eventName, listener)
@element.addEventListener(eventName, listener, capture)

removeListener: (eventName, listener) ->
super(eventName, listener)
@@ -17,21 +17,8 @@ for rowIndex in [0..rows-1]
y: rowIndex * (height + gutter)
backgroundColor: Utils.randomColor(.5)
superLayer: scroll.content

cellLayer.onClick ->
@backgroundColor = Color.random()

Utils.labelLayer cellLayer, rowIndex


eventKeys = [
"Move",
"ScrollStart",
"ScrollMove",
"ScrollEnd",
"ScrollAnimationDidStart",
"ScrollAnimationDidEnd",
]

_.map eventKeys, (eventKey) ->
print eventKey
scroll.on Events[eventKey], ->
print eventKey, Events[eventKey]

0 comments on commit d8ac785

Please sign in to comment.