Skip to content
Permalink
Browse files

Fix image flow

  • Loading branch information
Jonas Treub
Jonas Treub committed Jun 28, 2017
1 parent 9e3aeda commit f32e84edc972b5d6999f2a1bd8451e2a68034cd0
Showing with 5 additions and 5 deletions.
  1. +5 −5 framer/Layer.coffee
@@ -886,13 +886,16 @@ class exports.Layer extends BaseClass
@_getPropertyValue "image"
set: (value) ->

currentValue = @_getPropertyValue "image"

if currentValue is value
return @emit "load"

# Unset the background color only if it’s the default color
defaults = Defaults.getDefaults "Layer", {}
if @backgroundColor?.isEqual(defaults.backgroundColor)
@backgroundColor = null

currentValue = @_getPropertyValue "image"

if LinearGradient.isLinearGradient(value)
@emit("change:gradient", value, currentValue)
@emit("change:image", value, currentValue)
@@ -903,9 +906,6 @@ class exports.Layer extends BaseClass
if not (_.isString(value) or value is null)
layerValueTypeError("image", value)

if currentValue is value
return @emit "load"

# Set the property value
@_setPropertyValue("image", value)
if value in [null, ""]

0 comments on commit f32e84e

Please sign in to comment.
You can’t perform that action at this time.