mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASControlNode] Upgrades to +setEnableHitTestDebug: to intersect hitTestSlop with parents' bounds+slop, to accurately predict and visualize UIKit event delivery edge cases.
This commit is contained in:
@@ -100,12 +100,6 @@
|
||||
_cropDisplayBounds = CGRectNull;
|
||||
_placeholderColor = ASDisplayNodeDefaultPlaceholderColor();
|
||||
|
||||
if ([ASImageNode shouldShowImageScalingOverlay]) {
|
||||
_debugLabelNode = [[ASTextNode alloc] init];
|
||||
_debugLabelNode.layerBacked = YES;
|
||||
[self addSubnode:_debugLabelNode];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -144,6 +138,14 @@
|
||||
[self invalidateCalculatedLayout];
|
||||
if (image) {
|
||||
[self setNeedsDisplay];
|
||||
|
||||
if ([ASImageNode shouldShowImageScalingOverlay]) {
|
||||
ASPerformBlockOnMainThread(^{
|
||||
_debugLabelNode = [[ASTextNode alloc] init];
|
||||
_debugLabelNode.layerBacked = YES;
|
||||
[self addSubnode:_debugLabelNode];
|
||||
});
|
||||
}
|
||||
} else {
|
||||
self.contents = nil;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user