-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render off screen area #31
Comments
you can "render off-screen" by rendering it in a View that is not displayed or absolute "out of the screen". just a quick example: class Stuff extends Component {
snapIt() { return RNViewShot.takeSnapshot(this.refs.root, {...}) }
render () {
return <View ref="root">...</View>;
}
}
class MyApp extends Component {
doIt = () => { this.refs.stuff.snapIt().then(...) }
render () {
return <View>
<View style={{ position: "absolute", left: 1000 /* basically should be screenSize.width */ }}>
<Stuff ref="stuff" />
</View>
.. your app content..
<Button onPress={this.doIt} label="RENDER IT!" />
</View>
}
} |
Cool, This Works. Thanks a lot. |
@gre Have you ever encountered a view outside the Image will have a certain probability can not be captured; I am sure this picture has been loaded . if I set the
|
Do you have an exemple for a functional component? |
Hi,
is it possible to capture a whole View, even the parts that are not yet on screen (like in a scrollview)?
Or even better: capture a View that has not yet been given to the render method?
e.g.
Is this planned, and would this at all be possible with the current architecture?
Best, Tim
The text was updated successfully, but these errors were encountered: