destructor

destroys the gantt instance

void destructor();

Example

const myGantt = Gantt.getGanttInstance();
 
//destroying a gantt instance
myGantt.destructor();

Details

The method destroys a gantt instance and calls the onDestroy event.

Calling a destructor will:

  • clear the data loaded into a gantt instance
  • destroy the dataProcessor (if it is attached to the gantt)
  • detach the gantt from DOM
  • detach all DOM events attached via the event method

If you use a package that does not allow creating multiple instances of a gantt (GPL or Individual editions), calling the gantt destructor will make gantt inaccessible until page reload.

See also
Change log

added in version 5.1

Back to top