Recalculate some vars on window resize; constrain `mousePosition` to the container's size