the location property has changed in “y-coordinate”. I put isInitial:false and isOngoing:false in Lane groupTemplate, but error persists. How can I fix this?
(3) I want the footer section be the final of the resizing of all Lanes. How can I do this?
If you really care about the ordering of the lanes, and if you don’t really care about the locations of the lanes, I think you should add a property to each lane or pool data object that indicates its order (call it “order”?), and you should delete the “location” property on the data and the TwoWay Binding of it.
Then you can update the GridLayout.comparer function to use that data.order property. That also handles any header or footer lanes that you always want to be first or last.
But you will then need to change the behavior of DraggingTool so that it also sets the data.order property for the dragged lanes/pools. You can do that in the “SelectionMoved” and “SelectionCopied” DiagramEvent listeners: set the data.order property for each lane and each pool based on its current Y location, and then call the relayoutDiagram function, as the SwimLanes sample already does.
Please provide a complete but concise sample that demonstrates the problem. Strip out everything that is unrelated to the problem. Tell us what you got (what we need to do to reproduce the problem) and show us what you expected.
Why are you setting Layout.isInitial and Layout.isOngoing?
Your code does not follow my suggestion that you get rid of the “location” data property and substitute it with an “order” property, along with changes to PoolLayout.comparer and the “SelectionMoved” and “SelectionCopied” DiagramEvent listeners.
Still, if you really want to use explicit locations and Binding on Node.location, and if you really want to disable layout invalidation by setting Layout.isInitial to false, then you had better supply proper values for each data.location property. If you don’t and if its Layout does not get a chance to run to give the node a real location, it won’t have a real location, so it won’t be visible anywhere.
Perhaps I have an incomplete understand of what your requirements are for #1 and #3, but if you implemented the comparer function correctly for your app, it should have addressed both #1 and #3.