Closed LostSenSS closed 8 years ago
This is problem with simultaneous changeover of states in the set of elements during browser resize. When rounding values offsetWidth on certain width some elements go to the next state, while some are not.
A living example: http://jsfiddle.net/LostSenSS/15j004L6/
Screenshot: https://www.dropbox.com/s/ilh7h2skhgpaz2q/15j004L6.png
Possible solution. If instead of
widths.push(nodes[i].offsetWidth);
use
widths.push(nodes[i].getBoundingClientRect().width);
then the problem disappears.
This is problem with simultaneous changeover of states in the set of elements during browser resize. When rounding values offsetWidth on certain width some elements go to the next state, while some are not.
A living example: http://jsfiddle.net/LostSenSS/15j004L6/
Screenshot: https://www.dropbox.com/s/ilh7h2skhgpaz2q/15j004L6.png
Possible solution. If instead of
use
then the problem disappears.