Add parameter to invalidateSize for changing the center.
Moving brace to correct position.
Merge pull request #1766 from jacobtoye/invalidate-size-without-changing-center

Add parameter to invalidateSize for changing the center.