Resetting a default value after a state change
The arrow heads on the couple links in the genealogy example are not the same color as the rest of the link. The arrowhead color is a separate styling property of links, Color in the Arrow tab.
When a user selects a link, the rule that determines the color is the link:is selected rule. This rule makes the link color orange, but does not affect the arrowhead.
Open the genealogy example which you created in
Getting started by choosing
File > Open and selecting the appropriate project file if it is not already open.
NOTE File > Open can open only project files.
To include the arrowhead in the color change:
1. Select the link:is selected rule.
2. In the Arrow tab, set Color to orange.
3. Switch to Preview Mode to test the result.
4. Select a couple link. The color changes to orange, arrowhead included.
5. Select a node instead and the link color reverts to green.
However, the arrowhead does not revert to green.
This result is at first confusing but has a simple explanation and solution.
The Color property for the arrowhead is set to a default value (black) when the link is created. Therefore black is the color you see initially for the arrowheads on couple links. If you select a link and then deselect it, there is no rule explicitly giving the arrowhead a new color, so it stays orange.
To make sure that the arrowhead is set back to green:
1. Select the generic link rule.
2. In the Arrow tab, set Color to green.
It is only necessary to set the default value explicitly when the styling property undergoes a temporary change due to the state of an object. The possible states are selected, expanded, collapsed, or legend for nodes and selected or legend for links.
Note that not all properties have default values.
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.