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 @@
"gl-react-core": "^0.1.1"
},
"devDependencies": {
"eslint": "^1.2.1",
"eslint": "^1.3.1",
"eslint-plugin-react": "^3.2.3"
}
}
......@@ -27,7 +27,7 @@ const renderVGL = function (props, width, height, data, nbTargets, renderId) {
return <GLCanvas
ref="native"
{...props}
style={{ ...props.style, width, height }}
style={[ props.style, { width, height } ]}
data={data}
nbTargets={nbTargets}
renderId={renderId}
......@@ -36,13 +36,12 @@ const renderVGL = function (props, width, height, data, nbTargets, renderId) {
const renderVcontainer = function (style, width, height, targets, renderer) {
if (targets) {
const parentStyle = {
...style,
const parentStyle = [ style, {
position: "relative",
width: width,
height: height,
overflow: "hidden"
};
}];
return <View style={parentStyle}>
{targets}
{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