function dragEndCallback(e) {
  var eventData = e.detail;
  var element = eventData.element;

  element.removeEventListener(_events2.default.MOUSE_MOVE, dragCallback);
  element.removeEventListener(_events2.default.MOUSE_DRAG, dragCallback);

  element.removeEventListener(_events2.default.MOUSE_UP, dragEndCallback);
  element.removeEventListener(_events2.default.MOUSE_CLICK, dragEndCallback);

  element.addEventListener(_events2.default.MOUSE_DOWN, mouseDownCallback);

  var toolData = (0, _toolState.getToolState)(eventData.element, toolType);

  if (!toolData || !toolData.data || !toolData.data.length) {
    return;
  }

  // Update the endpoint as the mouse/touch is dragged
  toolData.data[0].endPoint = {
    x: eventData.currentPoints.image.x,
    y: eventData.currentPoints.image.y
  };

  applyWWWCRegion(eventData);
}
/* Applies the windowing procedure when the mouse drag ends */
Applies the windowing procedure when the mouse drag ends
Applies the windowing procedure when the mouse drag ends
function dragEndCallback(e) {
  var eventData = e.detail;
  var element = eventData.element;
  element.removeEventListener(_events2.default.MOUSE_MOVE, dragCallback);
  element.removeEventListener(_events2.default.MOUSE_DRAG, dragCallback);
  element.removeEventListener(_events2.default.MOUSE_UP, dragEndCallback);
  element.removeEventListener(_events2.default.MOUSE_CLICK, dragEndCallback);
  element.addEventListener(_events2.default.MOUSE_DOWN, mouseDownCallback);
  var toolData = (0, _toolState.getToolState)(eventData.element, toolType);
  if (!toolData || !toolData.data || !toolData.data.length) {
    return;
  }
  toolData.data[0].endPoint = {
    x: eventData.currentPoints.image.x,
    y: eventData.currentPoints.image.y
  };
  applyWWWCRegion(eventData);
}
function dragEndCallback ( e ) { var eventData = e . detail ; var element = eventData . element ; element . removeEventListener ( _events2 . default . MOUSE_MOVE , dragCallback ) ; element . removeEventListener ( _events2 . default . MOUSE_DRAG , dragCallback ) ; element . removeEventListener ( _events2 . default . MOUSE_UP , dragEndCallback ) ; element . removeEventListener ( _events2 . default . MOUSE_CLICK , dragEndCallback ) ; element . addEventListener ( _events2 . default . MOUSE_DOWN , mouseDownCallback ) ; var toolData = ( 0 , _toolState . getToolState ) ( eventData . element , toolType ) ; if ( ! toolData || ! toolData . data || ! toolData . data . length ) { return ; } toolData . data [ 0 ] . endPoint = { x : eventData . currentPoints . image . x , y : eventData . currentPoints . image . y } ; applyWWWCRegion ( eventData ) ; }
Applies the windowing procedure when the mouse drag ends
Applies the windowing procedure when the mouse drag ends
// Update the endpoint as the mouse/touch is dragged