Calculate distance between shapes

Hi,

While grouping i have issues with panel sizing. I am here trying to set the width of the panel by getting the shape that has the least actualBounds.x value and the highest actualBound.y value. Am i trying this the correct way.? How to get the distance value.

That’s correct. But I suppose it’s possible that the value of actualBounds hasn’t been recalculated yet due to layouts or modifications of the nodes such as changing their location, size, rotation et al.

okay. Can i get the distance between two points using go.Point.distanceSquared(xPoint, yPoint) ? since i get NaN value from it

xPoint.distanceSquaredPoint(yPoint) returns the square of the distance. What are xPoint and yPoint?

thank you walter, i have got the solution