Add Config::setPointScaleFactor to JavaScript binding
Summary: Needed for a project I'm working on to properly render on high dpi screens. I've manually tested against my project to confirm it works. Closes https://github.com/facebook/yoga/pull/612 Differential Revision: D6413517 Pulled By: emilsjolander fbshipit-source-id: c298d7f6b58dc45aaaede2bb995df8615911a4a9
This commit is contained in:
committed by
Facebook Github Bot
parent
7e3be21811
commit
c7f7ba250c
@@ -36,6 +36,11 @@ void Config::setExperimentalFeatureEnabled(int feature, bool enabled)
|
||||
YGConfigSetExperimentalFeatureEnabled(m_config, static_cast<YGExperimentalFeature>(feature), enabled);
|
||||
}
|
||||
|
||||
void Config::setPointScaleFactor(float pixelsInPoint)
|
||||
{
|
||||
YGConfigSetPointScaleFactor(m_config, pixelsInPoint);
|
||||
}
|
||||
|
||||
bool Config::isExperimentalFeatureEnabled(int feature) const
|
||||
{
|
||||
return YGConfigIsExperimentalFeatureEnabled(m_config, static_cast<YGExperimentalFeature>(feature));
|
||||
|
@@ -40,6 +40,7 @@ class Config {
|
||||
public: // Setters
|
||||
|
||||
void setExperimentalFeatureEnabled(int feature, bool enabled);
|
||||
void setPointScaleFactor(float pixelsInPoint);
|
||||
|
||||
public: // Getters
|
||||
|
||||
|
@@ -47,6 +47,7 @@ NBIND_CLASS(Config)
|
||||
method(destroy);
|
||||
|
||||
method(setExperimentalFeatureEnabled);
|
||||
method(setPointScaleFactor);
|
||||
|
||||
method(isExperimentalFeatureEnabled);
|
||||
}
|
||||
|
Reference in New Issue
Block a user