constructor(graphics) {
    super(componentNames.TEXT, graphics);

    /**
     * Default text style
     * @type {Object}
     */
    this._defaultStyles = defaultStyles;

    /**
     * Selected state
     * @type {boolean}
     */
    this._isSelected = false;

    /**
     * Selected text object
     * @type {Object}
     */
    this._selectedObj = {};

    /**
     * Editing text object
     * @type {Object}
     */
    this._editingObj = {};

    /**
     * Listeners for fabric event
     * @type {Object}
     */
    this._listeners = {
      mousedown: this._onFabricMouseDown.bind(this),
      select: this._onFabricSelect.bind(this),
      selectClear: this._onFabricSelectClear.bind(this),
      scaling: this._onFabricScaling.bind(this),
      textChanged: this._onFabricTextChanged.bind(this),
    };

    /**
     * Textarea element for editing
     * @type {HTMLElement}
     */
    this._textarea = null;

    /**
     * Ratio of current canvas
     * @type {number}
     */
    this._ratio = 1;

    /**
     * Last click time
     * @type {Date}
     */
    this._lastClickTime = new Date().getTime();

    /**
     * Text object infos before editing
     * @type {Object}
     */
    this._editingObjInfos = {};

    /**
     * Previous state of editing
     * @type {boolean}
     */
    this.isPrevEditing = false;
  }
Text
@class Text
@param {Graphics} graphics - Graphics instance
@extends {Component}
@ignore