Preserving the "view" scope for the "on_resize" method