android:fix synchronously set image

This commit is contained in:
pengfei.zhou 2020-04-26 14:54:01 +08:00 committed by osborn
parent 391060f72e
commit 2995296121

View File

@ -127,6 +127,14 @@ public class ImageNode extends ViewNode<ImageView> {
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<ImageView> {
}
}
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;