Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbok committed Jan 28, 2016
1 parent b2b197d commit 9d7c8ee
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions test/tests/LayerTest.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -446,27 +446,6 @@ describe "Layer", ->


simulate.mouseover(layer._element) simulate.mouseover(layer._element)


it "should not emit click event if a parent draggable was moved", ->

clicked = false

layerA = new Layer
layerB = new Layer superLayer:layerA

layerA.draggable.enabled = true
layerA.draggable._correctedLayerStartPoint = {x:10, y:10}
layerA.draggable.offset.should.eql {x:-10, y:-10}

layerB.on Events.Click, ->
clicked = true

layerB.emit(Events.Click)
clicked.should.equal false

layerA.draggable.enabled = false

layerB.emit(Events.Click)
clicked.should.equal true


it "should not emit click event if a parent draggable was moved on draggable", -> it "should not emit click event if a parent draggable was moved on draggable", ->


Expand All @@ -475,8 +454,7 @@ describe "Layer", ->
layerA = new Layer layerA = new Layer


layerA.draggable.enabled = true layerA.draggable.enabled = true
layerA.draggable._correctedLayerStartPoint = {x:10, y:10} layerA.draggable._isMoving = true
layerA.draggable.offset.should.eql {x:-10, y:-10}


layerA.on Events.Click, -> layerA.on Events.Click, ->
clicked = true clicked = true
Expand Down

0 comments on commit 9d7c8ee

Please sign in to comment.