Permalink
Browse files

Fix overflow for SVG layers

  • Loading branch information...
nvh committed Dec 11, 2017
1 parent 651439b commit c93bf721364ab26db05030bc407da88896a8259e
Showing with 17 additions and 0 deletions.
  1. +4 −0 framer/Config.coffee
  2. +1 −0 framer/SVGLayer.coffee
  3. +12 −0 test/tests/SVGLayerTest.coffee
View
@@ -37,6 +37,10 @@ body {
-webkit-user-select: auto;
}
.framerLayer svg {
overflow: visible;
}
.framerDebug {
padding: 6px;
color: #fff;
View
@@ -19,6 +19,7 @@ class exports.SVGLayer extends Layer
# set backgroundColor instead of color
options.color ?= options.backgroundColor
options.backgroundColor = null
options.clip ?= false
super options
@updateGradientSVG()
@@ -25,6 +25,18 @@ describe "SVGLayer", ->
b = a.copy()
a.htmlIntrinsicSize.should.eql b.htmlIntrinsicSize
describe "initializing", ->
it "should set clip to true by default", ->
a = new SVGLayer
a.clip.should.be.false
a._element.style.overflow.should.equal("visible")
it "should allow for overriding the clip property", ->
a = new SVGLayer
clip: true
a.clip.should.be.true
a._element.style.overflow.should.equal("hidden")
describe "svg", ->
describe "getter", ->
it "should return the SVG node", ->

0 comments on commit c93bf72

Please sign in to comment.