From 329faf6be8d3e9ba584aa67bf601a26760d9c6ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 23 Sep 2015 16:47:54 +0200 Subject: [PATCH] fix the eventsthrough for some reason it needs to be updated in render() --- RNGL/GLCanvas.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RNGL/GLCanvas.m b/RNGL/GLCanvas.m index aa46941..a5a4656 100644 --- a/RNGL/GLCanvas.m +++ b/RNGL/GLCanvas.m @@ -132,16 +132,16 @@ NSString* srcResource (id res) - (void)setEventsThrough:(BOOL)eventsThrough { _eventsThrough = eventsThrough; - [self updateUIE]; + [self syncEventsThrough]; } -(void)setVisibleContent:(BOOL)visibleContent { _visibleContent = visibleContent; - [self updateUIE]; + [self syncEventsThrough]; } -- (void) updateUIE +- (void) syncEventsThrough { self.userInteractionEnabled = !(_eventsThrough); self.superview.userInteractionEnabled = !(_eventsThrough && !_visibleContent); @@ -372,6 +372,7 @@ NSString* srcResource (id res) if (!_renderData) return; self.layer.opaque = _opaque; + [self syncEventsThrough]; CGFloat scale = RCTScreenScale(); -- 2.26.2