changed isVisible to use offsetWidth / offsetHeight