I want to know the coordinates of the line node

Hi all.

I want to get the upper left coordinate of a line shape using the Plugin API.
I_Need_Arrows_XY

Hi there,

Thanks for the post! As I checked with our internal team, it seems you can use absoluteBoundingBox (docs) – the x,y fields should be that top-left coordinates. If that doesn’t work, could you try absoluteRenderBounds (docs)?

absoluteRenderBounds is going to account for that stroke geometry that goes outside the absoluteBoundingBox (like that big circle on the starting point), but both properties are going to give you coordinates in canvas space.

On the other hand, the coordinates in the properties panel are relative to the node’s parent, so you will need to do some math to convert the canvas space coordinates to relative coordinates.

I hope this helps and please let us know how that works!

Thanks,
Toku/とく (日本語も大歓迎です)

1 Like

Thanks y_toku

I solved this problem by using “absoluteRenderBounds”.

(日本語も大歓迎です)

とても心強いです。今後ともよろしくお願いいたします。

Yoshio さん

解決できたとのご返信ありがとうございます!良かったです。
また何かありましたら、お気軽にForumご利用ください。

引き続きよろしくお願いいたします。

Toku