|Issue with layout of border nodes (arrange-all) [message #1810307]
||Wed, 07 August 2019 12:45
| Joerg Hermann
Registered: September 2012
I have implemented a custom LayoutNodeProvider that arranges container nodes in a certain grid, which involves resizing them as well. Attached to these containers I have a number of border nodes (usually 50 to 100 per container) that shall be arranged as
well in a semantically meaningful way.
Unfortunately, I need to invoke the 'arrange-all' action twice to achieve the desired result. The first run only places the container nodes correctly, but leaves the border nodes collapsed on the top of the container.
After deep diving into this behavior with the debugger, I found that during the preparation of the ChangeBoundsRequest the BorderItemLocator is invoked (getValidLocation()). Unfortunately, the resizing of the container node as parent for the border nodes has not happened yet at that point of time. So the container appears to be way too small to allow the desired placement of the border nodes.
Applying the 'arrange-all' a second time performs the correct placement as the size of the container nodes is now sufficient and getValidLocation() delivers the same position as passed in suggestedLocation.
- Is there a known way to suppress the invocation of the BorderItemLocator during the preparation of the command
- Is there (as a workaround) a way to split the layout command into two independent parts that are run sequentially (pass 1 would layout the containers, pass2 to border nodes)?
- Do you have any other suggestions to solve this?
(Overriding the BorderItemLocator in a way that it assigns fixed locations for the boder nodes is not an option, as I want to able to move things around after the layout has been applied.
Many thanks for any hint or idea
Powered by FUDForum
. Page generated in 0.01986 seconds