Permalink
Browse files

We actually also want this to happen for the content layer itself.

  • Loading branch information...
koenbok committed Dec 28, 2015
1 parent 643b636 commit 06b2cbb006b64c9afecc33b2a2d0681443a41036
Showing with 22 additions and 1 deletion.
  1. +1 −1 framer/Layer.coffee
  2. +21 −0 test/tests/LayerTest.coffee
@@ -881,7 +881,7 @@ class exports.Layer extends BaseClass
@_domEventManager.removeAllListeners(eventName)
_parentDraggableLayer: ->
for layer in @superLayers()
for layer in @superLayers().concat(@)
return layer if layer._draggable?.enabled
return null
@@ -568,6 +568,27 @@ describe "Layer", ->
layerB.emit(Events.Click)
clicked.should.equal true
it "should not emit click event if a parent draggable was moved on draggable", ->
clicked = false
layerA = new Layer
layerA.draggable.enabled = true
layerA.draggable._correctedLayerStartPoint = {x:10, y:10}
layerA.draggable.offset.should.eql {x:-10, y:-10}
layerA.on Events.Click, ->
clicked = true
layerA.emit(Events.Click)
clicked.should.equal false
layerA.draggable.enabled = false
layerA.emit(Events.Click)
clicked.should.equal true
describe "Hierarchy", ->
it "should insert in dom", ->

0 comments on commit 06b2cbb

Please sign in to comment.