Skip to content

Commit

Permalink
Add setPosition accepting Dimension
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[Internal][Added] - Add `setPosition` accepting `Dimension` in Yoga 2

Reviewed By: Andrey-Mishanin

Differential Revision: D39271414

fbshipit-source-id: af860078dec3db986d8357e4cf9ba867ba1e0532
  • Loading branch information
Fabrizio Cucci authored and facebook-github-bot committed Sep 7, 2022
1 parent 4f6929b commit 1f13811
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ReactCommon/flexlayout/flexlayout/FlexItemStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ class FLEX_LAYOUT_EXPORT FlexItemStyleBase {
return position[static_cast<size_t>(edge)];
}

void setPosition(Edge edge, Dimension dimension) {
position[static_cast<size_t>(edge)] = dimension;
}

void setPosition(Edge edge, Float value) {
position[static_cast<size_t>(edge)] = Dimension(value, Unit::Point);
}
Expand Down

0 comments on commit 1f13811

Please sign in to comment.