mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3cc335e615
Summary: Changelog: [iOS][internal] - Add tangentialPressure property to PointerEvent interface This diff adds the tangentialPressure property to the PointerEvent implementation on iOS. This one is pretty simple considering iOS doesn't have the concept of tangential pressure so we just hard code it to 0 as defined by the spec. Reviewed By: lunaleaps Differential Revision: D37759634 fbshipit-source-id: 7ca0e47267f5fde76ace2b96d05ea2e154cb4b8f
42 lines
1.4 KiB
C++
42 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)},
|
|
};
|
|
}
|
|
|
|
#endif
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|