...
|
...
|
@@ -248,7 +248,12 @@ |
|
|
- (void)hanldeTapGesture:(UITapGestureRecognizer *)gesture {
|
|
|
if (gesture == _tapGesture) {
|
|
|
|
|
|
CGFloat displayWidth = [[self.webView stringByEvaluatingJavaScriptFromString:@"window.innerWidth"] floatValue];
|
|
|
CGFloat scale = self.webView.frame.size.width / displayWidth;
|
|
|
CGPoint touchPoint = [gesture locationInView:self.webView];
|
|
|
// 如果webview是zoom状态,把对应的比例除去
|
|
|
touchPoint.x /= scale;
|
|
|
touchPoint.y /= scale;
|
|
|
|
|
|
BOOL validArea = YES;
|
|
|
BOOL validIdArea = YES;
|
...
|
...
|
|