TouchEventEmitter: Fix assignment of Y coordinates (#22160)

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: https://github.com/facebook/react-native/pull/22160

Differential Revision: D12943125

Pulled By: shergin

fbshipit-source-id: a3fde64c4d6c76784f1a0ac7cae4c0d62f3d4497
This commit is contained in:
empyrical 2018-11-06 11:11:27 -08:00 committed by Facebook Github Bot
parent 786df48b50
commit 6b6a27c6b0
1 changed files with 3 additions and 3 deletions

View File

@ -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;