when a node is both stretch and auto, get the result with width and height "null" #644
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 ?
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.
thank you for the hint @Lizz0y , I pushed a fix for this in #645
thx @woehrl01 for fix this problem