So I’m adding a tooltip to my flowchart using similar to this below:
toolTip:
$$(go.Adornment, “Auto”,
$$(go.Shape, { fill: “#FFFFCC” }),
$$(go.TextBlock, { margin: 4 },
new go.Binding(“text”, “showTip”))
)
As you can see, this is bound to the ‘showTip’ in my JSON object.
This works fine for those objects that have the showTip value - however, when I hover over an object with tooltips enabled but no showTip attribute then the previous showTip value is shown. By previous showTip … I mean the previous showTip that was shown on hover.
Scenario:
item1: “showTip”,“value1”
item2:
item3: “showTip”,“value3”
hovering over item 1 shows the correct value.
hovering over item 2 shows the value from item 1
hovering over item 3 shows the correct value.
hovering over item 2 shows the value from item 3
I can force this odd inheritance to not be so apparent in two ways
- Make showTip mandatory (not an option)
- Force an 'empty' value when no value is added in the JSON object (then renders an empty tooltip box) - "showTip"," "
I guess the other two options are to create my own ‘tooltip’ attaching a hover event and rendering my own tooltip but I’d rather use OOTB if this can work properly?
Or to create a copy of the object(s) that I want to support tooltips but a none-tooltip version - this feels really really hacky and from an editor perspective would do too.
Thanks