Hide tooltip on Condition mouse hover

Hi Guys…

I am very new to GoJS. My GoJS diagram shows a tooltip on mouse hover on all the action + condition nodes. I only want to display the tooltip on action nodes. How can I hide the tooltip on conditions’ mouse hover…

Thanks in advance…

You talk about “action” and “condition” nodes. If those are defined using separate templates, then don’t define the toolTip on the template for “condition” nodes.

If the two kinds of nodes share the same template, then one possibility is to define a Binding to control the visibility of the toolTip:

          toolTip:
            $(go.Adornment, "Auto",
              // show the tooltip only if the data.text string includes an "e"
              new go.Binding("visible", "text", function(t) { return t.indexOf('e') >= 0; }),
              $(go.Shape, { fill: "#FFFFCC" }),
              $(go.TextBlock, { margin: 4 },
                // the tooltip shows the result of calling nodeInfo(data)
                new go.Binding("text", "", nodeInfo))
            ),

Of course you’ll want to use your own predicate for deciding whether the data is an “action” or a “condition” model node data object.

Thanks, Walter… I will try your solution…

Nick…