diff --git a/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java b/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java index 7d683789..045d0711 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java @@ -127,6 +127,14 @@ public class ImageNode extends ViewNode { if (errorColor.isNumber()) { this.errorColor = errorColor.asNumber().toInt(); } + JSValue stretchInsetValue = jsObject.getProperty("stretchInset"); + if (stretchInsetValue.isObject()) { + this.stretchInset = stretchInsetValue.asObject(); + } + JSValue imageScaleValue = jsObject.getProperty("imageScale"); + if (imageScaleValue.isNumber()) { + this.imageScale = imageScaleValue.asNumber().toFloat(); + } } super.blend(jsObject); } @@ -357,16 +365,6 @@ public class ImageNode extends ViewNode { } } break; - case "stretchInset": - if (prop.isObject()) { - stretchInset = prop.asObject(); - } - break; - case "imageScale": - if (prop.isNumber()) { - imageScale = prop.asNumber().toFloat(); - } - break; default: super.blend(view, name, prop); break;