Source: model/ModelText.js

/**
 * @author    Wolfgang Kowarschick <kowa@hs-augsburg.de>
 * @copyright 2017 - 2018
 * @license   CC-BY-NC-SA-4.0
 */

/**
 * @property {string} text - the content of the text field
 *
 * @property {number} x    - the x position of the circle
 * @property {number} y    - the y position of the circle
 */
class ModelText
{ /**
   * @param {Object} [p_config]
   * @param {string} [p_config.text = '']
   * @param {number} [p_config.x = 0]
   * @param {number} [p_config.y = 0]
   */
  constructor(p_config = {})
  { this.config = p_config;
    this.reset();
  }
  
  reset()
  { const {text='', x=0, y=0} = this.config;
  
    this.text = text;
    this.x    = x;
    this.y    = y;
  }
}

export {ModelText};