constructTooltip(signature, div) {

    const ev = utils.parseJSON(signature);
    const id = ev.node || ev.edge;

    let text = null;
    const outType = 'text/html';
    const inType = 'text/vnd-tiddlywiki';

    if (ev.node) { // node

      const tRef = $tm.tracker.getTiddlerById(id);
      const tObj = utils.getTiddler(tRef);

      const descr = tObj.fields[$tm.field.nodeInfo];

      if (descr) {

        div.innerHTML = $tw.wiki.renderText(outType, inType, descr);

      } else if (tObj.fields.text) {

        // simply rendering the text is not sufficient as this prevents
        // us from updating the tooltip content on refresh. So we need
        // to create a temporary widget that is registered to the dom
        // node passed by the tooltip.

        utils.registerTransclude(this, 'tooltipWidget', tRef);
        this.tooltipWidget.setVariable('tv-tiddler-preview', 'yes');
        // Solves: https://github.com/felixhayashi/TW5-TiddlyMap/issues/365
        this.tooltipWidget.setVariable('currentTiddler', tRef);
        this.tooltipWidget.render(div);

      } else {

        div.innerHTML = tRef;

      }

    } else { // edge

      const edge = this.graphData.edgesById[id];
      const type = $tm.indeces.allETy[edge.type];

      if (type.description) {
        text = $tw.wiki.renderText(outType, inType, type.description);
      }

      div.innerHTML = (text || type.label || type.id);

    }

  }
called by tooltip class when tooltip is displayed;