I've created a list with draggable list items in framer.js written in coffeescript.
The array "Layers" contains the single list items.
for i in [0..3]
layer = new Layer width:listWidth, height:listHeight, y:i*yDistance, clip:false,
borderRadius: 4, superLayer:canvas
layer.listIndex = i
layer.draggable.enabled = true
layer.draggable.speedX = 0
layer.draggable.speedY = 1
Layers.push(layer)
When I now call a event listener on the list items the "layer" parameter is undefined
layer.on Events.DragMove, (event, draggable, layer) ->
print layer
I need the layer element in the event function to manipulate it. Where is the mistake?