INNER CODE UNIT · JavaScript
gutterSize
brh55/react-native-masonry · components/Column.js:68
const gutterSize = gutterBase * this.props.spacing;
// Column gutters are shared between right and left image
const columnWidth = (width / nColumns) - (gutterSize / 2);
if (this.state.columnWidth !== columnWidth) {
this.setState({
columnWidth
});
}
const divider = imgDimensions.width / columnWidth;
const newWidth = imgDimensions.width / divider;
const newHeight = imgDimensions.height / divider;
return { width: newWidth, height: newHeight, gutter: gutterSize };
}