Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions package/src/skia/SkiaCameraCanvas.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useCallback, useState } from 'react'
import { View } from 'react-native'
import type { LayoutChangeEvent, ViewProps } from 'react-native'
import type { CameraProps } from '../types/CameraProps'
import type { ISharedValue } from 'react-native-worklets-core'
Expand Down Expand Up @@ -47,10 +48,12 @@
}, [])

return (
<SkiaProxy.Canvas {...props} onLayout={onLayout} pointerEvents="none">
{children}
<SkiaProxy.Image x={0} y={0} width={width} height={height} fit={resizeMode} image={texture} />
</SkiaProxy.Canvas>
<View {...props} onLayout={onLayout} style={[props.style, { flex: 1 }]}>

Check warning on line 51 in package/src/skia/SkiaCameraCanvas.tsx

View workflow job for this annotation

GitHub Actions / Lint JS (eslint, prettier)

Inline style: { flex: 1 }
<SkiaProxy.Canvas style={{ width, height }} pointerEvents="none">
{children}
<SkiaProxy.Image x={0} y={0} width={width} height={height} fit={resizeMode} image={texture} />
</SkiaProxy.Canvas>
</View>
)
}

Expand Down