これは、私の ItemView のコード フラグメントです。
class List.GridRow extends Backbone.Marionette.ItemView
tagName: 'tr'
triggers:
'click': 'row:clicked'
次に、複合ビューでこれを行っています:
class List.GridView extends Backbone.Marionette.CompositeView
template: 'mapping/list/templates/grid'
itemView: List.GridRow
itemViewContainer: 'tbody'
initialize: (options) ->
@listenTo @, 'itemview:row:clicked', (itemView, data) -> @rowClicked(itemView, data)
rowClicked: (clickedItemView, data) =>
# I need the original event information to check of the ctrl or shift key was pressed?
#if !e.ctrlKey && !e.shiftKey
ここでやろうとしているのは、元のイベント情報をトリガー ハンドラーに渡すことですが、まだわかりませんか? マリオネットでこれを行う方法はありますか?何か不足していますか?
ありがとう!