修改position, offset不支持单个变量、gauge strokewidth仅支持数字

Signed-off-by: xiexiyun <xiexiyun@huawei.com>
Change-Id: I200831523c9a99c9118c60850881760237edbfed
This commit is contained in:
xiexiyun
2022-03-18 09:36:31 +08:00
parent f4e3369298
commit a3109fadf7
2 changed files with 2 additions and 2 deletions
@@ -139,7 +139,7 @@ void JSGauge::SetColors(const JSCallbackInfo& info)
void JSGauge::SetStrokeWidth(const JSCallbackInfo& info)
{
if (info.Length() < 1 && !info[0]->IsNumber()) {
if (info.Length() < 1) {
LOGE(" JSGauge::SetStrokeWidth::The info is wrong, it is supposed to have atleast 1 arguments");
return;
}
@@ -372,7 +372,7 @@ bool ParseLocationProps(const JSCallbackInfo& info, AnimatableDimension& x, Anim
JSRef<JSObject> sizeObj = JSRef<JSObject>::Cast(info[0]);
JSRef<JSVal> xVal = sizeObj->GetProperty("x");
JSRef<JSVal> yVal = sizeObj->GetProperty("y");
if (JSViewAbstract::ParseJsAnimatableDimensionVp(xVal, x) &&
if (JSViewAbstract::ParseJsAnimatableDimensionVp(xVal, x) ||
JSViewAbstract::ParseJsAnimatableDimensionVp(yVal, y)) {
return true;
}