Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Tooltips hide autometically for link

$
0
0

@biswa wrote:

How to hide tool-tips automatically for link?
My Code is:-

myDiagram.linkTemplate =
$(go.Link,
{ selectable: true, selectionAdornmentTemplate: linkSelectionAdornmentTemplate },
{ relinkableFrom: true, relinkableTo: true, reshapable: true },
{
routing: go.Link.AvoidsNodes,
curve: go.Link.JumpOver,
corner: 5,
toShortLength: 4,
selectable: true,
//layoutConditions: go.Part.LayoutAdded | go.Part.LayoutRemoved,
mouseDragEnter: function (e, link) {
link.isHighlighted = true;
},
mouseDragLeave: function (e, link) {
link.isHighlighted = false;
},
mouseDrop: dropOntoLink
},
$(go.Shape, {
stroke: “black”,
strokeWidth: 2,

        },
        
            new go.Binding("stroke", "isHighlighted", function (h) {
                return h ? "#088ecc" : "black";
            }).ofObject(),
            new go.Binding("strokeWidth", "isHighlighted", function (h) {
                return h ? 4 : 2;
            }).ofObject()),

            $(go.Panel, "Auto",  // this whole Panel is a link label
    $(go.Shape, "RoundedRectangle", { fill: "white", stroke: "gray" }),
    
    $(go.TextBlock, { margin: 3 },
      new go.Binding("text", "text"))
  )
  ,
  {
    toolTip: myToollinkTips
  });

var myToollinkTips = $(go.HTMLInfo, {
show: showToolTip,
hide: hideToolTip
});

function showToolTip(obj, diagram, tool) {
var toolTipDIV = document.getElementById(‘toolTipDIV’);
toolTipDIV.style.display = “block”;
}

function hideToolTip(diagram, tool) {
var toolTipDIV = document.getElementById(‘toolTipDIV’);
toolTipDIV.style.display = “none”;
}

tooltips show & hide automatically for link.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles