events:
'click .js-close-component-viewer': 'closeComponentViewer'
'click .sym': 'highlightUsages'
+ 'click .code-issue': 'selectIssue'
initialize: (options) ->
if selectedIssueView.length > 0 then selectedIssueView else null
+ selectIssue: (e) ->
+ key = $(e.currentTarget).data 'issue-key'
+ issue = @issues.find (issue) -> issue.get('key') == key
+ index = @options.app.issues.indexOf issue
+ @options.app.state.set selectedIndex: index
+
+
scrollToIssue: (key) ->
el = @$("[data-issue-key='#{key}']")
if el.length > 0
events:
+ 'click': 'selectCurrent'
'click .js-issues-to-source': 'openComponentViewer'
@$el.toggleClass 'selected', selected
+ selectCurrent: ->
+ @options.app.state.set selectedIndex: @options.index
+
+
onClose: ->
@issueBoxView?.close()