```coffeescript
BaseTool = window.Ubret.BaseTool or require('./base_tool')

class SubjectViewer extends BaseTool
  name: 'Subject Viewer'
  template:
    """
    <ul>
      <% for(i = 0; i < keys.length; i++) { %>
        <li>
          <%- keys[i] %>: <%- subject[keys[i]] %>
        </li>
      <% } %>
    </ul>
    """

  start: =>
    # data = @dimensions.id.top(Infinity)
    unless @selectedElements
      subject = @data[0]
      # subject = data[0]
    else
      subject = _.find data, (record) =>
        record.id == @selectedElements[0]

    compiled = _.template @template, { subject: subject, keys: @keys }
    @el.html compiled

    
if typeof require is 'function' and typeof module is 'object' and typeof exports is 'object'
  module.exports = SubjectViewer
else
  window.Ubret['SubjectViewer'] = SubjectViewer```

Revert to multi-select version of subejct_viewer
user
```coffeescript
BaseTool = window.Ubret.BaseTool or require('./base_tool')

class SubjectViewer extends BaseTool

  constructor: (opts) ->
    super
    @count = 0
    @div = d3.select(@selector)
    @start()

  start: =>
    subjects = new Array
    if @selectedElements.length isnt 0
      subjects = @dimensions.uid.top(Infinity).filter (item) =>
        item.uid in @selectedElements
    else
      subjects = [@dimensions.uid.top(1)[0]]
      @selectElements subjects
    @render(subjects)

  render: (subjects) =>
    @div.selectAll('div.subject').remove()

    subject = @div.selectAll('div')
      .data(subjects).enter()
        .append('div')
        .attr('class', 'subject')

    subject.selectAll('img')
      .append('img')
        .attr('src', (d) -> d.image)

    subject.selectAll('ul')
      .append('ul')
      .data((d) => @toArray(d)).enter()
        .append('li')
        .attr('data-key', (d) -> d[0])
        .text((d) => "#{@formatKey(d[0])}: #{d[1]}")

    subject.select("[data-key=\"#{@selectedKey}\"]")
      .attr('class', 'selected')

  toArray: (data) =>
    arrayedData = new Array
    arrayedData.push [key, data[key]] for key in @keys
    arrayedData

if typeof require is 'function' and typeof module is 'object' and typeof exports is 'object'
  module.exports = SubjectViewer
else
  window.Ubret['SubjectViewer'] = SubjectViewer```
assistant