onContextMenu method

dynamic onContextMenu(
  1. dynamic event
)

Implementation

onContextMenu(event) {
  if (!this.enabled) {
    return;
  }

  for (var i = 0; i < this.mouseActions.length; i++) {
    if (this.mouseActions[i]['mouse'] == 2) {
      //prevent only if button 2 is actually used
      event.preventDefault();
      break;
    }
  }
}