Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gl-react-native-v2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
gl-react-native-v2
Commits
3efbab54
Commit
3efbab54
authored
Jan 16, 2016
by
Gaëtan Renaudeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add setNativeProps method
Usage: setNativeProps({data}) more efficiently for animation purpose
parent
849713f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/GLCanvas.js
src/GLCanvas.js
+6
-2
No files found.
src/GLCanvas.js
View file @
3efbab54
...
...
@@ -30,7 +30,11 @@ class GLCanvas extends Component {
this
.
_pendingCaptureFrame
=
null
;
}
addPendingCaptureFrame
(
config
)
{
setNativeProps
(
props
)
{
this
.
refs
.
native
.
setNativeProps
(
props
);
}
_addPendingCaptureFrame
(
config
)
{
const
key
=
serializeOption
(
config
);
return
this
.
_pendingCaptureFrame
[
key
]
||
(
(
captureFrame
(
React
.
findNodeHandle
(
this
.
refs
.
native
),
config
),
...
...
@@ -77,7 +81,7 @@ class GLCanvas extends Component {
invariant
(
keys
.
length
===
nb
,
"
captureFrame(config): config must be an object with {format, type, quality, filePath}, found some invalid keys in '%s'
"
,
keys
);
config
=
configArg
;
}
return
this
.
addPendingCaptureFrame
({
return
this
.
_
addPendingCaptureFrame
({
format
:
"
base64
"
,
type
:
"
png
"
,
quality
:
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment