Backbone.Layoutmanager.js を使用してバックボーン プロジェクトに取り組んでいます。
ネストされたReceiverViewsを持つListViewを取得しました。
私のコレクションは順不同で更新されます - これらのビューを並べ替えたいのですが、コレクション全体を再レンダリングしたくありません。(古いビュー内の古いデータ/イベント ハンドラー/グラフ インスタンスを失うためです。)
直し方 ?
ReceiverListView = Backbone.View.extend({
manage:true,
initialize: function(options){
_.bindAll(this, "renderReceiver","renderMe");
this.vent = _.extend({}, Backbone.Events);
this.collection.on('add', this.renderMe, this);
},
renderMe: function(model1){
this.collection.sort(this.collection.comparator);
this.insertView(new ReceiverView({model: model1})).render();
}