destructor
Description
Destroys the gantt instance
destructor: () => void
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 and attachEvent methods
note
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.
Related API
Related Guides
Change log
- added in version 5.1