   zoom: 0
   view: [0, 0]
 
+  minZoom: null
+
   constructor: (options) ->
     @config[key] = val for key, val of options
 

    #features.map((f) -> JSON.stringify f.feature.properties).join(" - ")

  zoomBy: (step) ->
    return @zoom = 0 if @zoom+step < 0

    before = @zoom
    @zoom += step

      @_draw()

    @_resizeRenderer()
    @zoom = @minZoom

  _resizeRenderer: (cb) ->
    @width = @config.output.columns >> 1 << 2
    @height = @config.output.rows * 4 - 4

    @minZoom = 4-Math.log(4096/@width)/Math.LN2

    @renderer.setSize @width, @height

