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
c0296b93
"....mvn/wrapper/maven-wrapper.properties" did not exist on "91c16c25b3e57b74de270ac5eac58fcf90c5b79a"
Commit
c0296b93
authored
Jun 07, 2017
by
gevorg94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass backgroundColor directly to GLCanvas
parent
3426cc2a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
android/src/main/java/com/projectseptember/RNGL/GLCanvasManager.java
.../main/java/com/projectseptember/RNGL/GLCanvasManager.java
+10
-0
src/GLCanvas.js
src/GLCanvas.js
+4
-2
No files found.
android/src/main/java/com/projectseptember/RNGL/GLCanvasManager.java
View file @
c0296b93
...
...
@@ -52,6 +52,16 @@ public class GLCanvasManager extends SimpleViewManager<GLCanvas> {
view
.
setZOrderMediaOverlay
(
overlay
);
}
@ReactProp
(
name
=
"setZOrderOnTop"
)
public
void
setZOrderOnTop
(
GLCanvas
view
,
boolean
setZOrderOnTop
)
{
view
.
setZOrderOnTop
(
setZOrderOnTop
);
}
@ReactProp
(
name
=
"backgroundColor"
)
public
void
setBackgroundColor
(
GLCanvas
view
,
Integer
color
)
{
view
.
setBackgroundColor
(
color
);
}
@ReactProp
(
name
=
"pointerEvents"
)
public
void
setPointerEvents
(
GLCanvas
view
,
@Nullable
String
pointerEventsStr
)
{
if
(
pointerEventsStr
!=
null
)
{
...
...
src/GLCanvas.js
View file @
c0296b93
import
invariant
from
"
invariant
"
;
import
React
,
{
Component
}
from
"
react
"
;
import
{
requireNativeComponent
,
findNodeHandle
}
from
"
react-native
"
;
import
{
requireNativeComponent
,
findNodeHandle
,
processColor
}
from
"
react-native
"
;
import
captureFrame
from
"
./GLCanvas.captureFrame
"
;
const
serializeOption
=
config
=>
...
...
@@ -114,13 +114,15 @@ class GLCanvas extends Component {
render
()
{
const
{
width
,
height
,
width
,
height
,
style
,
onLoad
,
onProgress
,
eventsThrough
,
...
restProps
}
=
this
.
props
;
const
{
backgroundColor
}
=
style
;
return
<
GLCanvasNative
ref
=
"
native
"
{...
restProps
}
backgroundColor
=
{
processColor
(
backgroundColor
)}
style
=
{{
width
,
height
}}
onGLLoad
=
{
onLoad
?
onLoad
:
null
}
onGLProgress
=
{
onProgress
?
onProgress
:
null
}
...
...
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