   len = $("#js-length").val()
   if isFinite len
     VA.setLength +len
+  $("#js-length").val VA.length
 
   state = $("#js-state").val()
   if state == "random"

    @height = 200
    @pxWidth = 800
    @maxLength = @pxWidth / 2
    @stepLength = 50
    @animationQueue = []
    @working = false

  setLength: (length) =>
    if @working
      return
    @length = Math.max @minLength, Math.min @maxLength, length
    @values =  ( value * @height / @length for value in [1..@length] )
    @barWidth = 1
    while @pxWidth / @barWidth / 2 > @length
