retrieving x- en y coordinates for nested (visual) objects

Started by Gerald Groot Roessink, November 25, 2022, 19:18:20 PM

Previous topic - Next topic

Gerald Groot Roessink

Hello,

When I use the following commands for a nested object:

var x = diagramObject.bounds.x;
var y = diagramObject.bounds.y;

I will find the x- and y coordinates relative to the enveloping object.

Maybe this is intented, but I was looking voor de coordinates relative to the view.

Is that possible?
Gerald



Jean-Baptiste Sarrodie

Hi,

You have to compute absolute coordinates yourself by iterating through parents, until you reach the view itself.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.