           jCropOptions.setSelect = [0, 0, width, height]
         else
           jCropOptions.setSelect = [0, 0, @__resizedWidth, @__resizedHeight]
-        @__img.Jcrop jCropOptions+        setApi = (api) => @__jCropApi = api
+        @__img.Jcrop jCropOptions, -> setApi this

          width: @__widgetWidth
          height: @__widgetHeight
        @__widgetElement.appendTo @container
        @__bind()

      __bind: ->
        @__doneButton.click =>

      __calcImgSizes: ->
        @__originalWidth = @__img[0].width
        @__originalHeight = @__img[0].height
        [@__resizedWidth, @__resizedHeight] = 
          fitSize @__originalWidth, @__originalHeight, @__wrapWidth, @__wrapHeight, @__options.upscale
        @__img.attr
          width: @__resizedWidth
          height: @__resizedHeight
