Skip to content

Commit

Permalink
TouchEventEmitter: Fix assignment of Y coordinates (#22160)
Browse files Browse the repository at this point in the history
Summary:
This patch fixes the the assignment of Y coordinate information in the event payloads in `TouchEventEmitter`, which were inadvertently being assigned X coordinate data.
Pull Request resolved: #22160

Differential Revision: D12943125

Pulled By: shergin

fbshipit-source-id: a3fde64c4d6c76784f1a0ac7cae4c0d62f3d4497
  • Loading branch information
empyrical authored and facebook-github-bot committed Nov 6, 2018
1 parent 786df48 commit 6b6a27c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ReactCommon/fabric/components/view/TouchEventEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ namespace react {
static folly::dynamic touchPayload(const Touch &touch) {
folly::dynamic object = folly::dynamic::object();
object["locationX"] = touch.offsetPoint.x;
object["locationY"] = touch.offsetPoint.x;
object["locationY"] = touch.offsetPoint.y;
object["pageX"] = touch.pagePoint.x;
object["pageY"] = touch.pagePoint.x;
object["pageY"] = touch.pagePoint.y;
object["screenX"] = touch.screenPoint.x;
object["screenY"] = touch.screenPoint.x;
object["screenY"] = touch.screenPoint.y;
object["identifier"] = touch.identifier;
object["target"] = touch.target;
object["timestamp"] = touch.timestamp * 1000;
Expand Down

0 comments on commit 6b6a27c

Please sign in to comment.