 class BaseTool extends Ubret.Events
-  constructor: (selector) ->
+  constructor: (@selector) ->
     super
     @opts = new Object
-    @opts.selector = d3.select selector
-    @opts.height = @opts.selector[0][0].clientHeight
-    @opts.width = @opts.selector[0][0].clientWidth
     @opts.selectedKeys = new Array
     @opts.selectedIds = new Array
 

    @opts

  start: =>
    @opts.selector.html ''

  data: (data=[]) =>

    
  selectIds: (ids=[]) =>
    if _.isArray ids
      console.log 'here'
      @opts.selectedIds = ids
      console.log @opts.selectedIds, ids
    else
      @opts.selectedIds.push ids
    @trigger 'selection', ids
