Permalink
Browse files

layer clipping desabled by default

  • Loading branch information...
J.P.P Treub
J.P.P Treub committed Feb 3, 2016
1 parent b1ec9bc commit c18256848778cd7ab0fc7be1df517e0db87f4bba
Showing with 8 additions and 9 deletions.
  1. +1 −1 framer/Layer.coffee
  2. +7 −8 test/tests/LayerTest.coffee
@@ -121,7 +121,7 @@ class exports.Layer extends BaseClass
@define "visible", layerProperty(@, "visible", "display", true, _.isBoolean)
@define "opacity", layerProperty(@, "opacity", "opacity", 1, _.isNumber)
@define "index", layerProperty(@, "index", "zIndex", 0, _.isNumber, null, {importable:false, exportable:false})
@define "clip", layerProperty(@, "clip", "overflow", true, _.isBoolean)
@define "clip", layerProperty(@, "clip", "overflow", false, _.isBoolean)
@define "scrollHorizontal", layerProperty @, "scrollHorizontal", "overflowX", false, _.isBoolean, null, {}, (layer, value) ->
layer.ignoreEvents = false if value is true
@@ -227,19 +227,18 @@ describe "Layer", ->
layer = new Layer
layer.clip.should.equal true
layer.style["overflow"].should.equal "hidden"
layer.clip = false
layer.scroll.should.equal false
layer.clip.should.equal false
layer.style["overflow"].should.equal "visible"
layer.clip = true
layer.style["overflow"].should.equal "hidden"
it "should set scroll", ->
layer = new Layer
layer.scroll.should.equal false
layer.style["overflow"].should.equal "hidden"
layer.style["overflow"].should.equal "visible"
layer.scroll = true
layer.scroll.should.equal true
@@ -249,7 +248,7 @@ describe "Layer", ->
layer.scroll = false
layer.scroll.should.equal false
layer.style["overflow"].should.equal "hidden"
layer.style["overflow"].should.equal "visible"
it "should set scroll from properties", ->
@@ -264,7 +263,7 @@ describe "Layer", ->
layer = new Layer
layer.scroll.should.equal false
layer.style["overflow"].should.equal "hidden"
layer.style["overflow"].should.equal "visible"
layer.ignoreEvents.should.equal true
layer.scroll = true

0 comments on commit c182568

Please sign in to comment.