Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
computeLayoutAndBroadcastResults () {
computeLayout(this.stylesRoot);
this.layoutNotifier.emit('layout-update', this.stylesRoot);
}
getComputedLayout(childrenWithMergedStyles, style) {
const layout = {
children: Array.from(childrenWithMergedStyles || []),
style: {...style},
};
computeLayout(layout);
return layout;
}
computeLayout() {
const styleTree = buildStyleTree({
type: {
isThreeUIComponent: true
},
props: {
style: {
height: this.props.height,
width: this.props.width
},
children: this.props.children
}
});
computeLayout(styleTree);
this.setState({ styleTree });
}
this.raycasters = {};
this.state = {
styleTree: buildStyleTree({
type: {
isThreeUIComponent: true
},
props: {
style: {
height: props.height,
width: props.width
},
children: props.children
}
})
};
computeLayout(this.state.styleTree);
}