update `isVisible` calculation