setBaselineFunction not working in JavaScript #591

Open
opened 2017-07-08 19:59:42 -07:00 by ghost · 0 comments
ghost commented 2017-07-08 19:59:42 -07:00 (Migrated from github.com)

Report

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

# Report - [x] I have searched [existing issues](https://github.com/facebook/yoga/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`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#591
No description provided.