use of com.facebook.react.uimanager.ReactPointerEventsView 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;
}
Aggregations