Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,31 @@ namespace facebook::react {
const char AndroidHorizontalScrollContentViewShadowNodeComponentName[] =
"AndroidHorizontalScrollContentView";

AndroidHorizontalScrollContentViewShadowNode::
AndroidHorizontalScrollContentViewShadowNode(
const ShadowNodeFragment& fragment,
const ShadowNodeFamily::Shared& family,
ShadowNodeTraits traits)
: ConcreteViewShadowNode(fragment, family, traits) {
initialize();
}

AndroidHorizontalScrollContentViewShadowNode::
AndroidHorizontalScrollContentViewShadowNode(
const ShadowNode& sourceShadowNode,
const ShadowNodeFragment& fragment)
: ConcreteViewShadowNode(sourceShadowNode, fragment) {
initialize();
}

void AndroidHorizontalScrollContentViewShadowNode::initialize() noexcept {
if (getConcreteProps().collapsableChildren) {
traits_.unset(ShadowNodeTraits::Trait::ChildrenFormStackingContext);
} else {
traits_.set(ShadowNodeTraits::Trait::ChildrenFormStackingContext);
}
}

void AndroidHorizontalScrollContentViewShadowNode::layout(
LayoutContext layoutContext) {
ConcreteViewShadowNode::layout(layoutContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@ class AndroidHorizontalScrollContentViewShadowNode final
ScrollViewEventEmitter,
ScrollViewState> {
public:
using ConcreteViewShadowNode::ConcreteViewShadowNode;
AndroidHorizontalScrollContentViewShadowNode(
const ShadowNodeFragment &fragment,
const ShadowNodeFamily::Shared &family,
ShadowNodeTraits traits);

AndroidHorizontalScrollContentViewShadowNode(const ShadowNode &sourceShadowNode, const ShadowNodeFragment &fragment);

void layout(LayoutContext layoutContext) override;

private:
void initialize() noexcept;
};

} // namespace facebook::react
Loading