isActionable property

Can someone please explain isActionable property with an example?

What are the repercussions of not setting it to true for say a button?

If you look at the definition of a “Button” in extensions/Buttons.js it does set isActionable to true and then sets the four action… event handlers.

I suppose you can find other examples if you search the samples.

The purpose is to allow a GraphObject to act like a Tool, handling all mouse down-move-up events.

Perhaps you are not using a “Button” or something using a “Button”, by defining your own button-like behavior on a GraphObject. Then you might need to set GraphObject.isActionable to true in circumstances where it would not get the standard behavior. One common case for that is in Adornments.

For example, in the Hover Buttons sample, Buttons that show on Hover, the Placeholder in the Adornment shown in a mouseHover event wants to receive a click event. So it has to explicitly set isActionable to true. Of course that isn’t needed in the two "Button"s that the Adornment also has, because that’s already done by the definition of “Button”.

On the other hand, in order to receive click events you don’t have to set isActionable to true for GraphObjects that are in the visual tree of a Node or Link, because those are in normal Layers, not in Layer.isTemporary Layers.

The reason for that behavior is that most Adornments don’t really want to receive mouse events (including clicks), because that would interfere with many user gestures handled by Tools. However tools such as ResizingTool do want to get mouse behaviors on their tool handles, so they make sure to handle all of the mouse methods of the Tool class.