Skip to content

Commit

Permalink
fix(native): don't bind events to GLView (#3341)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Aug 26, 2024
1 parent 5099784 commit 0d8197a
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions packages/fiber/src/native/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,10 @@ const CanvasImpl = /*#__PURE__*/ React.forwardRef<View, Props>(
}, [canvas])

return (
<View ref={viewRef} onLayout={onLayout} style={{ flex: 1, ...style }}>
<View {...props} style={{ flex: 1 }}>
{width > 0 && (
<GLView
{...bind}
msaaSamples={antialias ? 4 : 0}
onContextCreate={onContextCreate}
style={StyleSheet.absoluteFill}
/>
)}
</View>
<View {...props} ref={viewRef} onLayout={onLayout} style={{ flex: 1, ...style }} {...bind}>
{width > 0 && (
<GLView msaaSamples={antialias ? 4 : 0} onContextCreate={onContextCreate} style={StyleSheet.absoluteFill} />
)}
</View>
)
},
Expand Down

0 comments on commit 0d8197a

Please sign in to comment.