43 Star 100 Fork 184

OpenHarmony / ace_ace_engine

 / 详情

Flex component wrap: FlexWrap parameter unsupported

Declined
Bug member
Opened this issue  
2021-11-09 20:48

according to documentation the signature of Flex component is:

Flex(value:{direction?: FlexDirection, wrap?: FlexWrap, justifyContent?: FlexAlign, alignItems?: ItemAlign, alignContent?: FlexAlign})

The purpose of the wrap parameter is
Whether the component has a single row/column or multiple rows/columns.

The wrap parameter however is not read:

jsview/js_flex_impl.cpp function JSFlexImpl::CreateWrapComponent C++ constructor function only reads these parameters:
JSRef directionVal = obj->GetProperty("direction");
JSRef justifyVal = obj->GetProperty("justifyContent");
JSRef alignItemVal = obj->GetProperty("alignItems");
JSRef alignContentVal = obj->GetProperty("alignContent");

Comments (2)

Guido Grassel created任务
Guido Grassel changed description
Guido Grassel changed issue type from 任务 to 缺陷
Expand operation logs

JSFlexImpl::CreateWrapComponent is not a constructor function. It is called in JSFlexImpl::Create, which is the actual constructor for Flex. The wrap parameter is read here:

void JSFlexImpl::Create(const JSCallbackInfo& info)
{
std::list<RefPtr> children;
if (info.Length() < 1) {
LOGI("No input args, use default row setting");
RefPtr row =
AceType::MakeRefPtrOHOS::Ace::RowComponent(FlexAlign::FLEX_START, FlexAlign::STRETCH, children);
ViewStackProcessor::GetInstance()->Push(row);
return;
}
if (!info[0]->IsObject()) {
LOGW("arg is not a object, use default row setting");
RefPtr row =
AceType::MakeRefPtrOHOS::Ace::RowComponent(FlexAlign::FLEX_START, FlexAlign::STRETCH, children);
ViewStackProcessor::GetInstance()->Push(row);
return;
}
JSRef obj = JSRef::Cast(info[0]);
JSRef wrapVal = obj->GetProperty("wrap");
...
}

Mike changed issue state from 待办的 to 已拒绝

和提单人沟通明确是非问题

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
参与者(3)
1
https://git.oschina.net/openharmony/ace_ace_engine.git
git@git.oschina.net:openharmony/ace_ace_engine.git
openharmony
ace_ace_engine
ace_ace_engine

Search