We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Aspect ratio does not respect min/max dimensions.
In the example below, the computed height is 200, but should be 50 because max-width is set.
const assert = require('assert'); const yoga = require('yoga-layout'); let rootNode = yoga.Node.create(); let childNode = yoga.Node.create(); childNode.setWidth(400); childNode.setMaxWidth(100); childNode.setAspectRatio(2); rootNode.insertChild(childNode, 0); rootNode.calculateLayout(1080, 768); assert.strictEqual(childNode.getComputedWidth(), 100); assert.strictEqual(childNode.getComputedHeight(), 50); rootNode.freeRecursive();
The documentation states that
AspectRatio respects the Min and Max dimensions of an item.
The height is calculated based on the explicit width.
The text was updated successfully, but these errors were encountered:
Hey @michaelmerrild I'm currently seeing the same thing on the latest master. Did this get anywhere?
Edit: probably should mention I'm using the C/C++ library directly.
Edit(2): Just rolled back from master to 1.10.0, this issue is still present.
Sorry, something went wrong.
Is facebook maintaining issues on github? Issue is 3 years old without any response
No branches or pull requests
Report
Issues and Steps to Reproduce
Aspect ratio does not respect min/max dimensions.
In the example below, the computed height is 200, but should be 50 because max-width is set.
Expected Behavior
The documentation states that
Actual Behavior
The height is calculated based on the explicit width.
The text was updated successfully, but these errors were encountered: