Hi all,
I am creating a node with hyperlink. Whenever I hover the text, the page link specified is displayed as a tooltip. Is it possible for the tooltip to display the text value instead of page link? If not possible, how about disable the hyperlink’s tooltip?
Here are my simplified codes:
var $ = go.GraphObject.make;
myDiagram =
$(go.Diagram, "myDiagramDiv",
{ initialContentAlignment: go.Spot.Center });
myDiagram.nodeTemplate =
$(go.Node, "Auto",
$(go.Shape, "RoundedRectangle", { stroke: null }, new go.Binding("fill", "bgcolor")),
$("HyperlinkText",
function(node) { return "https://www.google.com"; },
function(node) { return node.data.longtext; },
{ stroke: "white", font: "bold 30pt arial", maxSize: new go.Size(300, NaN), wrap: go.TextBlock.WrapFit }
), { toolTip:
$(go.Adornment, "Auto",
$(go.Shape, { fill: "#FFFFCC" }),
$(go.TextBlock, { margin: 4 },
new go.Binding("text", "tooltip"))
) }
);
myDiagram.model = new go.GraphLinksModel([
{ key: 1, bgcolor: "red", longtext: "Looooonnnngggg text here", tooltip: "<%=strName1%>" },
{ key: 2, bgcolor: "green", longtext: "Another looooooooooooooonnnnnnnggggg text here", tooltip: "<%=strName2%>" },
],[
{ from: 1, to: 2 }
]);
If you hover the text, “www.google.com” will be displayed as tooltip instead of the value of longtext. Need some help here.
Thank you.
Regards,
Brian