Permalink
Browse files

Fixed setting shadowType to box for all shadows

  • Loading branch information...
nvh committed Sep 18, 2017
1 parent a3b0c61 commit 7f67e44b4c70095fad27ccec94eb6cebdd48ea83
Showing with 12 additions and 1 deletion.
  1. +1 −1 framer/Layer.coffee
  2. +11 −0 test/tests/LayerTest.coffee
View
@@ -377,7 +377,7 @@ class exports.Layer extends BaseClass
@define "shadowBlur", layerProperty(@, "shadowBlur", null, 0, _.isNumber, null, {}, updateShadowsProperty("blur"))
@define "shadowSpread", layerProperty(@, "shadowSpread", null, 0, _.isNumber, null, {}, updateShadowsProperty("spread"))
@define "shadowColor", layerProperty(@, "shadowColor", null, "", Color.validColorValue, Color.toColor, {}, updateShadowsProperty("color"))
@define "shadowType", layerProperty(@, "shadowType", null, "box", null, null, {}, updateShadowsProperty("type"))
@define "shadowType", layerProperty(@, "shadowType", null, null, null, null, {}, updateShadowsProperty("type"))
@define "shadows",
default: null
get: ->
@@ -966,6 +966,17 @@ describe "Layer", ->
l.shadow1.type.should.equal "inner"
l.style.boxShadow.should.equal "rgb(255, 0, 0) 0px 10px 10px 0px inset"
it "should change the shadowType of all shadows using shadowType", ->
l = new Layer
shadows: [
blur: 10
type: "inset"
color: "red"
]
l.shadowType = "box"
l.shadow1.type.should.equal "box"
l.style.boxShadow.should.equal "rgb(255, 0, 0) 0px 0px 10px 0px"
describe "Events", ->
it "should remove all events", ->

0 comments on commit 7f67e44

Please sign in to comment.