function mouseDownCallback(e) {
  var eventData = e.detail;
  var element = eventData.element;
  var options = (0, _toolOptions.getToolOptions)(toolType, element);
  var config = freehandSculpter.getConfiguration();
  var imageNeedsUpdate = false;

  if (!(0, _isMouseButtonEnabled2.default)(eventData.which, options.mouseButtonMask)) {
    e.stopPropagation();
    e.preventDefault();

    return;
  }

  if (eventData.event.ctrlKey) {
    selectFreehandTool(eventData);
    imageNeedsUpdate = true;
  } else if (config.currentTool !== null) {
    initialiseSculpting(eventData);
    imageNeedsUpdate = true;
  }

  if (imageNeedsUpdate) {
    // Force onImageRendered
    _externalModules2.default.cornerstone.updateImage(eventData.element);
  }
}
/**
* Event handler for MOUSE_DOWN event.
*
* @event
* @param {Object} e - The event.
*/
Event handler for MOUSE_DOWN event.
Event handler for MOUSE_DOWN event .
function mouseDownCallback(e) {
  var eventData = e.detail;
  var element = eventData.element;
  var options = (0, _toolOptions.getToolOptions)(toolType, element);
  var config = freehandSculpter.getConfiguration();
  var imageNeedsUpdate = false;
  if (!(0, _isMouseButtonEnabled2.default)(eventData.which, options.mouseButtonMask)) {
    e.stopPropagation();
    e.preventDefault();
    return;
  }
  if (eventData.event.ctrlKey) {
    selectFreehandTool(eventData);
    imageNeedsUpdate = true;
  } else if (config.currentTool !== null) {
    initialiseSculpting(eventData);
    imageNeedsUpdate = true;
  }
  if (imageNeedsUpdate) {
    _externalModules2.default.cornerstone.updateImage(eventData.element);
  }
}
function mouseDownCallback ( e ) { var eventData = e . detail ; var element = eventData . element ; var options = ( 0 , _toolOptions . getToolOptions ) ( toolType , element ) ; var config = freehandSculpter . getConfiguration ( ) ; var imageNeedsUpdate = false ; if ( ! ( 0 , _isMouseButtonEnabled2 . default ) ( eventData . which , options . mouseButtonMask ) ) { e . stopPropagation ( ) ; e . preventDefault ( ) ; return ; } if ( eventData . event . ctrlKey ) { selectFreehandTool ( eventData ) ; imageNeedsUpdate = true ; } else if ( config . currentTool !== null ) { initialiseSculpting ( eventData ) ; imageNeedsUpdate = true ; } if ( imageNeedsUpdate ) { _externalModules2 . default . cornerstone . updateImage ( eventData . element ) ; } }
Event handler for MOUSE_DOWN event.
Event handler for MOUSE_DOWN event .
// Force onImageRendered