Files
react-native/ReactCommon/react/renderer/components/view/PointerEvent.cpp
T
Vincent Riemer 5989bca8ae Add twist property to PointerEvent interface
Summary:
Changelog: [iOS][internal] - Add twist property to PointerEvent interface

This adds the twist property to the PointerEvent implementation on iOS which similarly to tangentialPressure doesn't really apply so we default to a hard-coded value of 0.

Reviewed By: lunaleaps

Differential Revision: D37760511

fbshipit-source-id: f1fccfd6b5d07024cea83d86925a9bfc2e6cc8cf
2022-07-12 18:10:27 -07:00

43 lines
1.4 KiB
C++

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "PointerEvent.h"
namespace facebook {
namespace react {
#if RN_DEBUG_STRING_CONVERTIBLE
std::string getDebugName(PointerEvent const &pointerEvent) {
return "PointerEvent";
}
std::vector<DebugStringConvertibleObject> getDebugProps(
PointerEvent const &pointerEvent,
DebugStringConvertibleOptions options) {
return {
{"pointerId", getDebugDescription(pointerEvent.pointerId, options)},
{"pressure", getDebugDescription(pointerEvent.pressure, options)},
{"pointerType", getDebugDescription(pointerEvent.pointerType, options)},
{"clientPoint", getDebugDescription(pointerEvent.clientPoint, options)},
{"width", getDebugDescription(pointerEvent.width, options)},
{"height", getDebugDescription(pointerEvent.height, options)},
{"tiltX", getDebugDescription(pointerEvent.tiltX, options)},
{"tiltY", getDebugDescription(pointerEvent.tiltY, options)},
{"detail", getDebugDescription(pointerEvent.detail, options)},
{"buttons", getDebugDescription(pointerEvent.buttons, options)},
{"tangentialPressure",
getDebugDescription(pointerEvent.tangentialPressure, options)},
{"twist", getDebugDescription(pointerEvent.twist, options)},
};
}
#endif
} // namespace react
} // namespace facebook