resize
イベントはに送信されますwindow
:
ブラウザウィンドウのサイズが変更されると、イベントが要素に送信resize
されますwindow
ただし、バックボーンビューのイベントは、ビューのel
usingにバインドされますdelegate
。ビューはイベントをel
取得しないため、ビューを挿入しても効果はありません。resize
'resize articule': 'repositionBoards'
events
ビューでイベントを取得する必要がある場合は、それを自分自身resize
にバインドする必要があります。window
initialize: (options) ->
$(window).on('resize', this.repositionBoards)
remove: ->
$(window).off('resize', this.repositionBoards) # Clean up after yourself.
@$el.remove() # The default implementation does this.
@
repositionBoards: ->
# Use => if you need to worry about what `@` is
board.align()
また、ハンドラーremove
のバインドを解除できるように、が追加されていることに注意してください。resize
もちろん、view.remove()
ビューを削除するために使用するか、そのビューがアプリケーション全体であるかどうかを気にする必要はありません。