Commit 329faf6b authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

fix the eventsthrough

for some reason it needs to be updated in render()
parent f443f379
...@@ -132,16 +132,16 @@ NSString* srcResource (id res) ...@@ -132,16 +132,16 @@ NSString* srcResource (id res)
- (void)setEventsThrough:(BOOL)eventsThrough - (void)setEventsThrough:(BOOL)eventsThrough
{ {
_eventsThrough = eventsThrough; _eventsThrough = eventsThrough;
[self updateUIE]; [self syncEventsThrough];
} }
-(void)setVisibleContent:(BOOL)visibleContent -(void)setVisibleContent:(BOOL)visibleContent
{ {
_visibleContent = visibleContent; _visibleContent = visibleContent;
[self updateUIE]; [self syncEventsThrough];
} }
- (void) updateUIE - (void) syncEventsThrough
{ {
self.userInteractionEnabled = !(_eventsThrough); self.userInteractionEnabled = !(_eventsThrough);
self.superview.userInteractionEnabled = !(_eventsThrough && !_visibleContent); self.superview.userInteractionEnabled = !(_eventsThrough && !_visibleContent);
...@@ -372,6 +372,7 @@ NSString* srcResource (id res) ...@@ -372,6 +372,7 @@ NSString* srcResource (id res)
if (!_renderData) return; if (!_renderData) return;
self.layer.opaque = _opaque; self.layer.opaque = _opaque;
[self syncEventsThrough];
CGFloat scale = RCTScreenScale(); CGFloat scale = RCTScreenScale();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment