Skip to content

Commit

Permalink
Rename @Proxy to @alias
Browse files Browse the repository at this point in the history
  • Loading branch information
nvh committed Jan 15, 2018
1 parent d90e148 commit 00df8de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions framer/SVGBaseLayer.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class exports.SVGBaseLayer extends Layer
@define "html", get: -> @_element.outerHTML or "" @define "html", get: -> @_element.outerHTML or ""
@define "width", get: -> @_width @define "width", get: -> @_width
@define "height", get: -> @_height @define "height", get: -> @_height

# Disabled properties # Disabled properties
@undefine ["label", "blending", "image"] @undefine ["label", "blending", "image"]
@undefine ["blur", "brightness", "saturate", "hueRotate", "contrast", "invert", "grayscale", "sepia"] # webkitFilter properties @undefine ["blur", "brightness", "saturate", "hueRotate", "contrast", "invert", "grayscale", "sepia"] # webkitFilter properties
Expand All @@ -25,18 +25,18 @@ class exports.SVGBaseLayer extends Layer
@undefine ["borderRadius", "cornerRadius", "borderStyle"] @undefine ["borderRadius", "cornerRadius", "borderStyle"]
@undefine ["constraintValues", "htmlIntrinsicSize"] @undefine ["constraintValues", "htmlIntrinsicSize"]


# Proxied helpers # Aliassed helpers
@proxy = (propertyName, proxiedName) -> @alias = (propertyName, proxiedName) ->
@define propertyName, @define propertyName,
get: -> get: ->
@[proxiedName] @[proxiedName]
set: (value) -> set: (value) ->
return if @__applyingDefaults return if @__applyingDefaults
@[proxiedName] = value @[proxiedName] = value


@proxy "borderColor", "stroke" @alias "borderColor", "stroke"
@proxy "strokeColor", "stroke" @alias "strokeColor", "stroke"
@proxy "borderWidth", "strokeWidth" @alias "borderWidth", "strokeWidth"


# Overridden functions from Layer # Overridden functions from Layer
_insertElement: -> _insertElement: ->
Expand Down

0 comments on commit 00df8de

Please sign in to comment.