code: function calculateDraggerSize() {
      var cw = $container.width() / scale;
      var ch = $container.height() / scale;
      // doc.x / container.x = canvas.x / dragger.x
      var width = (cw * canvasSize.x) / docSize.x;
      var height = (ch * canvasSize.y) / docSize.y;
  
      // limit size to bounds of canvas
      if (width > canvasSize.x) {
        width = canvasSize.x;
      }
  
      if (height > canvasSize.y) {
        height = canvasSize.y;
      }
  
      view.setDraggerSize(width, height);
    }
docs: Calculates and sets the size of the dragger element.