refactored update_size for canvas objects