setBaselineFunction not working in JavaScript
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18.9k
- Forks
- 1.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Report
- I have searched existing issues and this is not a duplicate
Issues and Steps to Reproduce
Replaces this with steps to repro your issue.
setBaselineFunction doesn't seem to be available in JavaScript build.
In the Java and C# builds you can set a baseline function like this (copied from YogaNodeTest.java:
child2.setBaselineFunction(new YogaBaselineFunction() {
public float baseline(YogaNode node, float width, float height) {
return 0;
}
});
Expected Behavior
Describe what you expected would happen.
Ability to set function in JS, e.g. by using child2.setBaselineFunction((node, width, height) => 80);
Actual Behavior
Describe what actually happened.
Error is thrown TypeError: child2.setBaselineFunction is not a function
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the Java and C# baseline-function APIs, including YogaNodeTest.java, with the JavaScript build entry point for setBaselineFunction. Expose equivalent JavaScript behavior for the callback described in the issue and verify that child2.setBaselineFunction no longer throws a TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100