adjustCanvasDimensionBase(canvasImage = null) {
    if (!canvasImage) {
      canvasImage = this.canvasImage;
    }

    const { width, height } = canvasImage.getBoundingRect();
    const maxDimension = this._calcMaxDimension(width, height);

    this.setCanvasCssDimension({
      width: '100%',
      height: '100%', // Set height '' for IE9
      'max-width': `${maxDimension.width}px`,
      'max-height': `${maxDimension.height}px`,
    });

    this.setCanvasBackstoreDimension({
      width,
      height,
    });
    this._canvas.centerObject(canvasImage);
  }
Adjust canvas dimension with scaling image