Selection Adornment rotation

Hello!

I’m using a custom the selection adornment, in order to display some actions buttons on a specific node (like in this sample: Selection Adornment Showing Buttons for Nodes | GoJS Diagramming Library)

The behavior that I’m facing, is that whenever the node has an angle (90deg) the adornment is rotated as well).

Is it possible to overcome this ? I would like to have the buttons from the selection adornment always at the top of the node, if possible. Or is it totally wrong the path that I’m taking to solve the issue ?

Thanks!

That is usually what most people want. But maybe not for this kind of Adornment. One way around it is to wrap what is now your Node Panel in a “Position” Panel, holding it as its only element. Name that new panel and set Node.rotateObjectName to that name.

So basically you would create a new Panel with all of the non-Node-specific properties that is currently your Node, and change your Node to be a “Position” Panel (which is the default type of Panel). Of course you have to leave the Node-specific properties on the Node.

So what had maybe been:

Node, "Auto", rotatable: true, ...nodeProperties..., ...panelProperties...
    Shape
    ... stuff ...

would become:

Node, rotatable: true, rotateObjectName: "BODY", ...nodeProperties...
    Panel, "Auto", name: "BODY", ...panelProperties...
        Shape
        ... stuff ...

Thanks a lot walter!

This is the exact behavior that I wanted.
Still learning the structure & layouts of the Panels/Nodes and how to use them in specific cases!

All the best!