improve reading dimension for resize and center slide if any parent is
hidden