Permalink
Browse files

Setting opacity from SVGBaseLayers

  • Loading branch information...
nvh committed Jan 17, 2018
1 parent 10af20c commit 6ffdfe99c569c73b5f7632d828bb3c9699a10318
Showing with 2 additions and 2 deletions.
  1. +1 −1 framer/Layer.coffee
  2. +1 −1 framer/SVGBaseLayer.coffee
@@ -267,7 +267,7 @@ class exports.Layer extends BaseClass
)

@define "visible", layerProperty(@, "visible", "display", true, _.isBoolean)
@define "opacity", layerProperty(@, "opacity", "opacity", 1, _.isNumber)
@define "opacity", layerProperty(@, "opacity", "opacity", 1, _.isNumber, parseFloat)
@define "index", layerProperty(@, "index", "zIndex", 0, _.isNumber, null, {importable: false, exportable: false})
@define "clip", layerProperty(@, "clip", "overflow", false, _.isBoolean, null, {}, null, "_elementHTML", true)

@@ -72,7 +72,7 @@ class exports.SVGBaseLayer extends Layer
delete options.parent
delete options.element

pathProperties = ["fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-dasharray", "stroke-dashoffset", "name"]
pathProperties = ["fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-dasharray", "stroke-dashoffset", "name", "opacity"]
_.defaults options, @constructor.attributesFromElement(pathProperties, element)
if @_element.transform.baseVal.numberOfItems > 0
translate = @_element.transform.baseVal.getItem(0).matrix

0 comments on commit 6ffdfe9

Please sign in to comment.