Refactor render in canvas when model attributes changes