Commit f85f4a07 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

Allow to use RN's StyleSheet ids on GL.View style (fixes #2)

parent bb243b46
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
"gl-react-core": "^0.1.1" "gl-react-core": "^0.1.1"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^1.2.1", "eslint": "^1.3.1",
"eslint-plugin-react": "^3.2.3" "eslint-plugin-react": "^3.2.3"
} }
} }
...@@ -27,7 +27,7 @@ const renderVGL = function (props, width, height, data, nbTargets, renderId) { ...@@ -27,7 +27,7 @@ const renderVGL = function (props, width, height, data, nbTargets, renderId) {
return <GLCanvas return <GLCanvas
ref="native" ref="native"
{...props} {...props}
style={{ ...props.style, width, height }} style={[ props.style, { width, height } ]}
data={data} data={data}
nbTargets={nbTargets} nbTargets={nbTargets}
renderId={renderId} renderId={renderId}
...@@ -36,13 +36,12 @@ const renderVGL = function (props, width, height, data, nbTargets, renderId) { ...@@ -36,13 +36,12 @@ const renderVGL = function (props, width, height, data, nbTargets, renderId) {
const renderVcontainer = function (style, width, height, targets, renderer) { const renderVcontainer = function (style, width, height, targets, renderer) {
if (targets) { if (targets) {
const parentStyle = { const parentStyle = [ style, {
...style,
position: "relative", position: "relative",
width: width, width: width,
height: height, height: height,
overflow: "hidden" overflow: "hidden"
}; }];
return <View style={parentStyle}> return <View style={parentStyle}>
{targets} {targets}
{renderer} {renderer}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment