 TaylorColors = require "./color/taylor"
 ZappoColors = require "./color/zappo"
 HydroColors = require "./color/hydrophobicity"
+mouse = require "../utils/mouse"
+_ = require "underscore"
 
 module.exports = pluginator.extend
 

        @ctx.fillStyle = "#" + color
        @ctx.fillRect x,y,rectWidth,rectHeight
        @ctx.strokeText c,x + 3,y + 12,rectWidth
      x = x + rectWidth

      # out of viewport - stop
      if x > @el.width
        break

  render: ->



    #@el.setAttribute 'width', 300
    #@el.style.width = 300

    @manageEvents()

  manageEvents: ->
    events = {}
    if @g.config.get "registerMouseClicks"
      events.click = "_onclick"
    if @g.config.get "registerMouseHover"
      events.mousein = "_onmousein"
      events.mouseout = "_onmouseout"
    @delegateEvents events

    # listen for changes
    @listenTo @g.config, "change:registerMouseHover", @manageEvents
    @listenTo @g.config, "change:registerMouseClick", @manageEvents

  draw: ->
    @removeViews()
