src/element.js
/**
  * Registers an event for an element.
  *
  * @param string The element id
  * @param string The group the element is in
  * @param object The event cfg object
  * @param boolean The popup cfg object
  * @return none
  */
Registers an event for an element.
Registers an event for an element .
eventRegister(id, gid, ev, altcfg) {
    if (!ev) return;
    if (!ev.group) ev.group = this.h.getGraphID() + ' default';
    let p={}, item={elId:id, groupId:gid, ev:ev}
    if (this.cfg.popup.enabled)
      p = this.popup.register(altcfg.popup);
    this.events.push({...item, ...p});
  }
eventRegister ( id , gid , ev , altcfg ) { if ( ! ev ) return ; if ( ! ev . group ) ev . group = this . h . getGraphID ( ) + ' default' ; let p = { } , item = { elId : id , groupId : gid , ev : ev } if ( this . cfg . popup . enabled ) p = this . popup . register ( altcfg . popup ) ; this . events . push ( { ... item , ... p } ) ; }
Registers an event for an element.
Registers an event for an element .