Skip to content

ASDisplayNode vertical hit point is incorrect inside ASCollectionNode when inverted set to trueΒ #1763

@kelhutch17

Description

@kelhutch17

I have an inverted ASCollectionNode (_collectionNode.inverted = YES;). My collection node items contain some ASDisplayNodes. The tap targets we have setup on these nodes have incorrect (possibly inverted) hit areas now. This issue is not present in 2.7.0, but it is present in 2.8.1 (I did not test 2.8 explicitly but I assume the issue was introduced there as 2.8.1 was a small release).

Example:
I overrode this method in my ASDisplayNode subclass

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
  NSLog(@"point: x(%f), y(%f)", point.x, point.y);
  return [super hitTest:point withEvent:event];
}

When tapping an area of the node in 2.7.0, I see ~(x: 16, y: 13). In 2.8.1 I now see ~(x: 16, y: 83) when tapping the same approximate area of the node.


This might be related to: #1723

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions