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()) { if (errorColor.isNumber()) {
this.errorColor = errorColor.asNumber().toInt(); 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); super.blend(jsObject);
} }
@ -357,16 +365,6 @@ public class ImageNode extends ViewNode<ImageView> {
} }
} }
break; break;
case "stretchInset":
if (prop.isObject()) {
stretchInset = prop.asObject();
}
break;
case "imageScale":
if (prop.isNumber()) {
imageScale = prop.asNumber().toFloat();
}
break;
default: default:
super.blend(view, name, prop); super.blend(view, name, prop);
break; break;