org-chart icon indicating copy to clipboard operation
org-chart copied to clipboard

Searched node doesn't come at center on the very first time. What is the significance of _centered?

Open saaagarsingh opened this issue 9 months ago • 2 comments

When I'm trying to search for a node I want it to be highlighted and positioned at center of my page but when all the nodes are collapsed and I'm trying to search for a node my node gets highlighted but it is not coming at the center of the page. Tried using the setCentered method as well and _centered property as well but nothing seems to work. Is there a possible way to align it center on every search like if my chart is collapsed and I try to search for a node it will be centered.

Also just for information after setHighlighted I've appended initialZoom(1).

Expected behavior Expected behaviour is that it should show the searched node at the center,

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: MAC Browser- chrome Smartphone (please complete the following information): Device: [e.g. iPhone6] OS: [e.g. iOS8.1] Browser [e.g. stock browser, safari] Version [e.g. 22]

saaagarsingh avatar May 20 '24 11:05 saaagarsingh