src/tools/FreehandRoiSculptorTool.js
/**
   * Attaches event listeners to the element such that is is visible, modifiable, and new data can be created.
   *
   * @private
   * @param {Object} element - The viewport element to attach event listeners to.
   * @modifies {element}
   * @returns {void}
   */
Attaches event listeners to the element such that is is visible, modifiable, and new data can be created.
@private
@param {Object} element - The viewport element to attach event listeners to.
@modifies {element}
@returns {void}
Attaches event listeners to the element such that is is visible modifiable and new data can be created . @private @param { Object } element - The viewport element to attach event listeners to . @modifies { element } @returns { void }
_activateSculpt(element) {
    this._deactivateSculpt(element);
    element.addEventListener(EVENTS.MOUSE_UP, this.activeMouseUpCallback);
    element.addEventListener(EVENTS.MOUSE_CLICK, this.activeMouseUpCallback);
    element.addEventListener(EVENTS.MOUSE_DRAG, this.activeMouseDragCallback);
    element.addEventListener(EVENTS.TOUCH_END, this.activeTouchEndCallback);
    element.addEventListener(EVENTS.TOUCH_TAP, this.activeTouchEndCallback);
    element.addEventListener(EVENTS.TOUCH_DRAG, this.activeMouseDragCallback);
    external.cornerstone.updateImage(element);
  }
_activateSculpt ( element ) { this . _deactivateSculpt ( element ) ; element . addEventListener ( EVENTS . MOUSE_UP , this . activeMouseUpCallback ) ; element . addEventListener ( EVENTS . MOUSE_CLICK , this . activeMouseUpCallback ) ; element . addEventListener ( EVENTS . MOUSE_DRAG , this . activeMouseDragCallback ) ; element . addEventListener ( EVENTS . TOUCH_END , this . activeTouchEndCallback ) ; element . addEventListener ( EVENTS . TOUCH_TAP , this . activeTouchEndCallback ) ; element . addEventListener ( EVENTS . TOUCH_DRAG , this . activeMouseDragCallback ) ; external . cornerstone . updateImage ( element ) ; }
Attaches event listeners to the element such that is is visible, modifiable, and new data can be created.
Attaches event listeners to the element such that is is visible modifiable and new data can be created .
// Begin activeMouseDragCallback loop - call activeMouseUpCallback at end of drag or straight away if just a click.