constructor(wrapper, options) {
    options = extend(
      {
        includeUI: false,
        usageStatistics: true,
      },
      options
    );

    this.mode = null;

    this.activeObjectId = null;

    /**
     * UI instance
     * @type {Ui}
     */
    if (options.includeUI) {
      const UIOption = options.includeUI;
      UIOption.usageStatistics = options.usageStatistics;

      this.ui = new UI(wrapper, UIOption, this.getActions());
      options = this.ui.setUiDefaultSelectionStyle(options);
    }

    /**
     * Invoker
     * @type {Invoker}
     * @private
     */
    this._invoker = new Invoker();

    /**
     * Graphics instance
     * @type {Graphics}
     * @private
     */
    this._graphics = new Graphics(this.ui ? this.ui.getEditorArea() : wrapper, {
      cssMaxWidth: options.cssMaxWidth,
      cssMaxHeight: options.cssMaxHeight,
    });

    /**
     * Event handler list
     * @type {Object}
     * @private
     */
    this._handlers = {
      keydown: this._onKeyDown.bind(this),
      mousedown: this._onMouseDown.bind(this),
      objectActivated: this._onObjectActivated.bind(this),
      objectMoved: this._onObjectMoved.bind(this),
      objectScaled: this._onObjectScaled.bind(this),
      objectRotated: this._onObjectRotated.bind(this),
      objectAdded: this._onObjectAdded.bind(this),
      objectModified: this._onObjectModified.bind(this),
      createdPath: this._onCreatedPath,
      addText: this._onAddText.bind(this),
      addObject: this._onAddObject.bind(this),
      textEditing: this._onTextEditing.bind(this),
      textChanged: this._onTextChanged.bind(this),
      iconCreateResize: this._onIconCreateResize.bind(this),
      iconCreateEnd: this._onIconCreateEnd.bind(this),
      selectionCleared: this._selectionCleared.bind(this),
      selectionCreated: this._selectionCreated.bind(this),
    };

    this._attachInvokerEvents();
    this._attachGraphicsEvents();
    this._attachDomEvents();
    this._setSelectionStyle(options.selectionStyle, {
      applyCropSelectionStyle: options.applyCropSelectionStyle,
      applyGroupSelectionStyle: options.applyGroupSelectionStyle,
    });

    if (options.usageStatistics) {
      sendHostName();
    }

    if (this.ui) {
      this.ui.initCanvas();
      this.setReAction();
      this._attachColorPickerInputBoxEvents();
    }
    fabric.enableGLFiltering = false;
  }
Image editor
@class
@param {string|HTMLElement} wrapper - Wrapper's element or selector
@param {Object} [options] - Canvas max width & height of css
 @param {number} [options.includeUI] - Use the provided UI
   @param {Object} [options.includeUI.loadImage] - Basic editing image
     @param {string} options.includeUI.loadImage.path - image path
     @param {string} options.includeUI.loadImage.name - image name
   @param {Object} [options.includeUI.theme] - Theme object
   @param {Array} [options.includeUI.menu] - It can be selected when only specific menu is used, Default values are \['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'mask', 'filter'\].
   @param {string} [options.includeUI.initMenu] - The first menu to be selected and started.
   @param {Object} [options.includeUI.uiSize] - ui size of editor
     @param {string} options.includeUI.uiSize.width - width of ui
     @param {string} options.includeUI.uiSize.height - height of ui
   @param {string} [options.includeUI.menuBarPosition=bottom] - Menu bar position('top', 'bottom', 'left', 'right')
 @param {number} options.cssMaxWidth - Canvas css-max-width
 @param {number} options.cssMaxHeight - Canvas css-max-height
 @param {Object} [options.selectionStyle] - selection style
 @param {string} [options.selectionStyle.cornerStyle] - selection corner style
 @param {number} [options.selectionStyle.cornerSize] - selection corner size
 @param {string} [options.selectionStyle.cornerColor] - selection corner color
 @param {string} [options.selectionStyle.cornerStrokeColor] = selection corner stroke color
 @param {boolean} [options.selectionStyle.transparentCorners] - selection corner transparent
 @param {number} [options.selectionStyle.lineWidth] - selection line width
 @param {string} [options.selectionStyle.borderColor] - selection border color
 @param {number} [options.selectionStyle.rotatingPointOffset] - selection rotating point length
 @param {Boolean} [options.usageStatistics=true] - Let us know the hostname. If you don't want to send the hostname, please set to false.
@example
var ImageEditor = require('tui-image-editor');
var blackTheme = require('./js/theme/black-theme.js');
var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
  includeUI: {
    loadImage: {
      path: 'img/sampleImage.jpg',
      name: 'SampleImage'
    },
    theme: blackTheme, // or whiteTheme
    menu: ['shape', 'filter'],
    initMenu: 'filter',
    uiSize: {
        width: '1000px',
        height: '700px'
    },
    menuBarPosition: 'bottom'
  },
  cssMaxWidth: 700,
  cssMaxHeight: 500,
  selectionStyle: {
    cornerSize: 20,
    rotatingPointOffset: 70
  }
});