Renaming issue fixed.
extract computeVisiblePosition function.