DHTMLX/gantt

show_tooltip and _tooltip_pos are not part of library and throwing an error at 4.1.19 version

vittal288 opened this issue · 1 comments

Property '_tooltip_pos' does not exist on type 'GanttStatic'.
Property  '_show_tooltip' does not exist on type 'GanttStatic'.

This is the code

  this.events.push(
      gantt.attachEvent('onMouseMove', (event_id, ev) => {
        let linkageDetails;
        let linkId;

        // @ TODO, un commented the due to resolve the build issue
        //linkId = gantt.locate(ev, 'link_id');
        linkId = gantt.locate(ev);
        console.log('LINK ID', gantt.getLink('link_id'));

        if (linkId) {
          linkageDetails = ganttChartService.constructLinkageDetailsMarkUp(linkId);
          gantt._show_tooltip(linkageDetails, gantt._tooltip_pos(ev));
        }
      })
    );

Hello,
gantt._show_tooltip() and gantt._tooltip_pos(ev) are internal API functions. They were removed in the 6.1 version.
It is not a good practice to use internal methods and functions as they might change and we do not inform about that. If you use the public API, we inform about deprecations and provide the instructions to migrate to a newer version:
https://docs.dhtmlx.com/gantt/migrating.html

You need to manually add types for those internal methods if you still want to use them. Or add the following string to allow all types for Gantt:

declare let gantt: any;