saving zoom when visibility goes to false.