Skip to content

Commit

Permalink
PointerEvents: Delete unused method
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal] - Clean up unused function for PointerEvents

Reviewed By: vincentriemer, mdvacca

Differential Revision: D41089897

fbshipit-source-id: 8c44b88d919f771fdafb2402ec71366dad6c6ed6
  • Loading branch information
lunaleaps authored and facebook-github-bot committed Nov 28, 2022
1 parent 75a8847 commit 4e66816
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
import android.view.MotionEvent;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.react.R;
import com.facebook.react.common.ReactConstants;

/** Class responsible for generating catalyst touch events based on android {@link MotionEvent}. */
public class PointerEventHelper {
Expand Down Expand Up @@ -52,31 +50,6 @@ public static enum EVENT {
public static final String POINTER_OVER = "topPointerOver";
public static final String POINTER_OUT = "topPointerOut";

/** We don't dispatch capture events from native; that's currently handled by JS. */
public static @Nullable String getDispatchableEventName(EVENT event) {
switch (event) {
case LEAVE:
return PointerEventHelper.POINTER_LEAVE;
case DOWN:
return PointerEventHelper.POINTER_DOWN;
case MOVE:
return PointerEventHelper.POINTER_MOVE;
case ENTER:
return PointerEventHelper.POINTER_ENTER;
case CANCEL:
return PointerEventHelper.POINTER_CANCEL;
case UP:
return PointerEventHelper.POINTER_UP;
case OVER:
return PointerEventHelper.POINTER_OVER;
case OUT:
return PointerEventHelper.POINTER_OUT;
default:
FLog.e(ReactConstants.TAG, "No dispatchable event name for type: " + event);
return null;
}
}

// https://w3c.github.io/pointerevents/#the-buttons-property
public static int getButtons(String eventName, String pointerType, int buttonState) {
if (isExitEvent(eventName)) {
Expand Down

0 comments on commit 4e66816

Please sign in to comment.