Open briankalwat opened 8 years ago
The margin values that are defined here should probably be dynamically generated from Junction so that they will always be consistent with the system as a whole.
https://github.com/NewSpring/Apollos/blob/master/sites/newspring/imports/pages/series/series.VideoList.jsx#L47
if (typeof window != "undefined" || window != null) { let itemSize = (window.innerWidth - 40) * 0.8; // four-fifths itemSize += 20; // account for margin const items = this.props.sermons.content.sermons.length; const width = (items * itemSize) + 40; return { width: `${width}px` }
fwiw, this is what I ended up using.
window.getComputedStyle(element, null).getPropertyValue("margin-right").replace('px','')
@briankalwat thanks! yea we should totally make this dynamic.
The margin values that are defined here should probably be dynamically generated from Junction so that they will always be consistent with the system as a whole.
https://github.com/NewSpring/Apollos/blob/master/sites/newspring/imports/pages/series/series.VideoList.jsx#L47