Exploring snap-points implementation is Javascript