mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-19 11:05:17 +08:00
Merge pull request #1338 from tomizimobile/truncationTokenFix
[ASTextNode] Fix tapping on truncation token for 3D Touch phones
This commit is contained in:
@@ -891,11 +891,16 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ];
|
||||
{
|
||||
[super touchesMoved:touches withEvent:event];
|
||||
|
||||
UITouch *touch = [touches anyObject];
|
||||
CGPoint locationInView = [touch locationInView:self.view];
|
||||
// on 3D Touch enabled phones, this gets fired with changes in force, and usually will get fired immediately after touchesBegan:withEvent:
|
||||
if (CGPointEqualToPoint([touch previousLocationInView:self.view], locationInView))
|
||||
return;
|
||||
|
||||
// If touch has moved out of the current highlight range, clear the highlight.
|
||||
if (_highlightRange.length > 0) {
|
||||
NSRange range = NSMakeRange(0, 0);
|
||||
CGPoint point = [[touches anyObject] locationInView:self.view];
|
||||
[self _linkAttributeValueAtPoint:point
|
||||
[self _linkAttributeValueAtPoint:locationInView
|
||||
attributeName:NULL
|
||||
range:&range
|
||||
inAdditionalTruncationMessage:NULL
|
||||
|
||||
Reference in New Issue
Block a user