if you move `isOverEvent` and `isOutEvent` up, I think this can just be `if (isOverEvent || isOutEvent)`