def jsTooltip (self):
        settings = self.root ().settings
        return """
  function Tooltip (root) {
    var canvasRoot = root;
    var tooltipGroup;
    var tooltipPath;
    var tooltipTextNode;
    var tooltipText;
    var xPadding = """ + str (settings.tooltipXPadding) + """;
    var yPadding = """ + str (settings.tooltipYPadding) / """; 
    var xOffset = """ + str (settings.tooltipXOffset) + """;
    var yOffset = """ + str (settings.tooltipYOffset) + """;

    this.setText = function (value) {
      tooltipText.nodeValue = value;
      setPath ();
      positionText ();
    }

    this.move = function (target) {
      var v = pos (target);
""" + self.jsChangeTooltipPos () + """   
      var o = getOffset (target);
      var transform = 'translate(' + (v.x + o.x) + ' ' + (v.y + o.y) + ')';
      tooltipGroup.setAttribute ('transform', transform);
    }

    this.show = function () {
      tooltipGroup.setAttribute ('visibility', 'visible');
    }

    this.hide = function (event) {
      tooltipGroup.setAttribute ('visibility', 'hidden');
    }

    var setPath = function () {
      var width = parseFloat (tooltipTextNode.getBBox().width) + xPadding;
      var height = parseFloat (tooltipTextNode.getBBox ().height) + yPadding;
      var data = 'M 0 0 ';
      data += 'L ' + width + ' 0 ';
      data += 'L ' + width + ' ' + height + ' ';
      data += 'L ' + 0 + ' ' + height + ' ';
      data += 'Z';
      tooltipPath.setAttribute ('d', data);
    }

    var positionText = function () {
        tooltipTextNode.setAttribute ('x', 0);
        tooltipTextNode.setAttribute ('y', 0);
        var box = tooltipTextNode.getBBox ();
        tooltipTextNode.setAttribute ('x', xPadding / 2.0);
        tooltipTextNode.setAttribute ('y', -box.y + (yPadding / 2.0));

    }

    var getOffset = function (target) {
      var v = pos (target);
      var x, y;
      var targetWidth;
""" + self.jsChangeTooltipPos () + """   
      var width = parseFloat (tooltipTextNode.getBBox().width);
      var height = parseFloat (tooltipTextNode.getBBox ().height);
      quad = getView (canvasRoot).quadrant (v);
      switch (quad) {
      case 1:
        x = -(width + xPadding + xOffset);
        y = yOffset;
        break;
      case 2:
        x = xOffset;
        y = yOffset;
        break;
      case 3:
        x = xOffset;
        y = -(height + yPadding + yOffset);
        break;
      case 4:
        x = -(width + xPadding + xOffset);
        y = -(height + yPadding + yOffset);
      }
      return new vect (x, y);
    }

    var tooltipDOM = function () {
      tooltipGroup = document.createElementNS ('http://www.w3.org/2000/svg', 'g');
      tooltipPath = document.createElementNS ('http://www.w3.org/2000/svg', 'path');
      tooltipTextNode = document.createElementNS ('http://www.w3.org/2000/svg', 'text');
      tooltipText = document.createTextNode ('TestNode');

      tooltipPath.setAttribute ('fill', 'white');
      tooltipPath.setAttribute ('stroke', 'black');

      tooltipTextNode.setAttribute ('font-family', 'arial, sans-serif');
      tooltipTextNode.setAttribute ('font-size', """ + str (settings.tooltipSize) + """);
      tooltipTextNode.setAttribute ('text-anchor', 'start');

      canvasRoot.appendChild (tooltipGroup);
      tooltipGroup.appendChild (tooltipPath);
      tooltipGroup.appendChild (tooltipTextNode);
      tooltipTextNode.appendChild (tooltipText);

      this.hide ();

      setEvents.call (this, canvasRoot);
    }

    var onHover = function (event) {
      var target = event.target;
      p = pos (target);  
      this.setText (target.getAttribute ('tooltip-text'));
      this.move (target);
      this.show ();
    }

    var unHover = function (event) {
      this.hide ();
    }

    var setEvents = function (node) {
      if (node.getAttribute) {
        if (node.getAttribute ('has-tooltip') && node.getAttribute ('has-tooltip') != 'False') {
          registerEvent (node, 'mouseover', onHover, this);
          registerEvent (node, 'mouseout', unHover, this);
        }
        for (var i = 0; i < node.childNodes.length; i ++) {
          setEvents.call (this, node.childNodes[i]);
        }
      }
    }

    tooltipDOM.call (this);
  }

  registerEvent (window, 'load', function () {
                                   var root = document.getElementById ('canvas-root');
                                   var t = new Tooltip (root);
                                 });
"""
dataset/ETHPy150Open dotskapes/dotSkapes/modules/savage/graph/base.py/UnifiedGraph.jsTooltip/operator `+` -> `/`