Fixed correct resize usage for api 1.1.
Check if CP is visible before resizing.