i m trying to get the x and y cordinate from the layout but when geting the layout from a VisualizationViewer the returned type is not staticLayout but ObservableCachingLayout (of course it couldn’t be casted to static).
Is there a way to get the staticlayout from a VisualizationViewer ?
Or a way to get the x and y from the viz ? thx
i m trying to get the x and y cordinate from the layout but
Share
To get the x and y coordinate from the
Layout, you calllayout.transform(vertex). (ALayoutis aTransformerfrom vertices toPointobjects.)StaticLayoutis an instance ofLayoutthat allows the user to easily specify the coordinates of each vertex; it’s intended for the case in which you already have coordinates and don’t need an algorithm to determine them.