Skip to content

Commit

Permalink
Remove unecessary PointerEvent attributes
Browse files Browse the repository at this point in the history
Summary: Changelog: [iOS][Internal] Remove unecessary PointerEvent attributes

Reviewed By: kacieb

Differential Revision: D37115465

fbshipit-source-id: 079a297d1ce5b3d2c6766036a111c73bd75535f1
  • Loading branch information
vincentriemer authored and facebook-github-bot committed Jun 16, 2022
1 parent 7b0ba6d commit 033ffcc
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
4 changes: 0 additions & 4 deletions React/Fabric/RCTSurfaceTouchHandler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ static PointerEvent CreatePointerEventFromActiveTouch(ActiveTouch activeTouch)
event.pressure = touch.force;
event.pointerType = PointerTypeCStringFromUITouchType(activeTouch.touchType);
event.clientPoint = touch.pagePoint;
event.target = touch.target;
event.timestamp = touch.timestamp;
return event;
}

Expand All @@ -196,8 +194,6 @@ static PointerEvent CreatePointerEventFromActiveTouch(ActiveTouch activeTouch)
event.pressure = 0.0;
event.pointerType = "mouse";
event.clientPoint = RCTPointFromCGPoint(clientLocation);
event.target = (Tag)view.tag;
event.timestamp = timestamp;
return event;
}

Expand Down
2 changes: 0 additions & 2 deletions ReactCommon/react/renderer/components/view/PointerEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ std::vector<DebugStringConvertibleObject> getDebugProps(
{"pressure", getDebugDescription(pointerEvent.pressure, options)},
{"pointerType", getDebugDescription(pointerEvent.pointerType, options)},
{"clientPoint", getDebugDescription(pointerEvent.clientPoint, options)},
{"target", getDebugDescription(pointerEvent.target, options)},
{"timestamp", getDebugDescription(pointerEvent.timestamp, options)},
};
}

Expand Down
10 changes: 0 additions & 10 deletions ReactCommon/react/renderer/components/view/PointerEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ struct PointerEvent {
* opposed to the coordinate within the page).
*/
Point clientPoint;
/*
* A reference to the view to which the event was originally dispatched.
*/
Tag target;
/*
* The time at which the event was created (in milliseconds). By
* specification, this value is time since epoch—but in reality, browsers'
* definitions vary.
*/
Float timestamp;
};

#if RN_DEBUG_STRING_CONVERTIBLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ static jsi::Value pointerEventPayload(
object.setProperty(runtime, "pointerType", event.pointerType);
object.setProperty(runtime, "clientX", event.clientPoint.x);
object.setProperty(runtime, "clientY", event.clientPoint.y);
object.setProperty(runtime, "target", event.target);
object.setProperty(runtime, "timestamp", event.timestamp * 1000);
return object;
}

Expand Down

0 comments on commit 033ffcc

Please sign in to comment.