use of com.facebook.react.uimanager.PointerEvents in project react-native-gesture-handler by kmagiera.
the class RNViewConfigurationHelper method getPointerEventsConfigForView.
@Override
public PointerEventsConfig getPointerEventsConfigForView(View view) {
PointerEvents pointerEvents;
pointerEvents = view instanceof ReactPointerEventsView ? ((ReactPointerEventsView) view).getPointerEvents() : PointerEvents.AUTO;
// be valid targets.
if (!view.isEnabled()) {
if (pointerEvents == PointerEvents.AUTO) {
return PointerEventsConfig.BOX_NONE;
} else if (pointerEvents == PointerEvents.BOX_ONLY) {
return PointerEventsConfig.NONE;
}
}
switch(pointerEvents) {
case BOX_ONLY:
return PointerEventsConfig.BOX_ONLY;
case BOX_NONE:
return PointerEventsConfig.BOX_NONE;
case NONE:
return PointerEventsConfig.NONE;
}
return PointerEventsConfig.AUTO;
}
use of com.facebook.react.uimanager.PointerEvents in project gl-react-native by ProjectSeptemberInc.
the class GLCanvasManager method setPointerEvents.
@ReactProp(name = "pointerEvents")
public void setPointerEvents(GLCanvas view, @Nullable String pointerEventsStr) {
if (pointerEventsStr != null) {
PointerEvents pointerEvents = PointerEvents.valueOf(pointerEventsStr.toUpperCase(Locale.US).replace("-", "_"));
view.setPointerEvents(pointerEvents);
}
}
Aggregations