-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when a node is both stretch and auto, get the result with width and height "null" #644
Comments
It excludes auto, as if you have a margin of auto, the node should not stretch. Margin is "stronger" than align-item. Thus the node is the size of its content, but it shouldn't be "null". Could you please provide a testcase where it fails, I'll take a look into it. |
i write a node with "text" type ,since text has no width&height,so i set a custom measureFunction as:
when i run this code ,find the text node return "null" for both height and width, please find what's wrong with it ,thx |
It should be a width and height of 50 and left 450 here. I'll reproduce and have a look. |
thx @woehrl01 for fix this problem |
Summary: If you have a measurable node and set ```marign-left: auto``` + ```align-item:stretch``` on it, it won't get measured and they get a width/height of ```-(nan)```. This change fixes that behaviour. Fixes #644. Closes #645 Differential Revision: D6413512 Pulled By: emilsjolander fbshipit-source-id: 755febeb33bb0d4520ca6b3c28d56ac333e4a14d
Report
when a node is both cross stretch and margin auto, get the result with width and height "null",i have read the source code and found the following code:
can someone explain , since the alignItem is already stretch ,auto is meaningless, so why this code exclude the auto ?
The text was updated successfully, but these errors were encountered: