Skip to content

Commit f78812d

Browse files
committed
Revert "* [ios] revert onclick coordinate convert"
This reverts commit 5e249f8.
1 parent 5e249f8 commit f78812d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ - (void)onClick:(__unused UITapGestureRecognizer *)recognizer
234234

235235
if (!CGRectEqualToRect(self.calculatedFrame, CGRectZero)) {
236236
CGRect frame = [self.view.superview convertRect:self.calculatedFrame toView:self.view.window];
237-
position[@"x"] = @(frame.origin.x);
238-
position[@"y"] = @(frame.origin.y);
239-
position[@"width"] = @(frame.size.width);
240-
position[@"height"] = @(frame.size.height);
237+
position[@"x"] = @(frame.origin.x/WXScreenResizeRadio());
238+
position[@"y"] = @(frame.origin.y/WXScreenResizeRadio());
239+
position[@"width"] = @(frame.size.width/WXScreenResizeRadio());
240+
position[@"height"] = @(frame.size.height/WXScreenResizeRadio());
241241
}
242242

243243
[self fireEvent:@"click" params:@{@"position":position}];

0 commit comments

Comments
 (0)