Added a fourth state for visiblePartX and visiblePartY: middle
Add minified code