Remove unecessary PointerEvent attributes
Summary: Changelog: [iOS][Internal] Remove unecessary PointerEvent attributes Reviewed By: kacieb Differential Revision: D37115465 fbshipit-source-id: 079a297d1ce5b3d2c6766036a111c73bd75535f1
This commit is contained in:
Родитель
7b0ba6d94f
Коммит
033ffcc14b
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -196,8 +194,6 @@ CreatePointerEventFromIncompleteHoverData(UIView *view, CGPoint clientLocation,
|
|||
event.pressure = 0.0;
|
||||
event.pointerType = "mouse";
|
||||
event.clientPoint = RCTPointFromCGPoint(clientLocation);
|
||||
event.target = (Tag)view.tag;
|
||||
event.timestamp = timestamp;
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче