When I adjust the width of the swimlane, sometimes the node is separated from the swimlane, such as the situation in the gif below :
https://drive.google.com/file/d/1vbiz-2aZVToFyL0XwzqwlfiGQAnXxj6K/view?usp=sharing
It can be seen that when adjusting the length of swimlane, the node is directly excluded from the lane.
Hi Tealer,
We are checking on your requirement. We will update the more details on June 29, 2022.
Regards,
Deepa Thiruppathy
Hi Tealer,
Requirement: Lane children stay in the same lane while adjusting swimlane height.
In SfDiagram, if we placed a child in the lane of a swimlane, then the size of the lane in the swimlane will not go beyond the size of the child's bounds. So, your requirement is the basic behavior of the lane. But in the provided .gif, you are adjusting the height of the lane beyond its children's bounds. So, we suspect that you have implemented any sample level codes for this behavior, or the node in the lane is not added as a child for the lane. So, please validate the implemented codes or modify the already provided sample to reproduce the issue on our end. This will help us to provide a proper solution for your requirement.
Regards,
Karkuvel Rajan S
Thank your for reply.
This is my project file :
https://drive.google.com/file/d/1Uv6DKh-EZ3SPrkOQTIL4Pi7Sfsawu2MX/view?usp=sharing
Hi Tealer,
We have validated the sample. You have used Custom resizing for LPR node alone. So capacitor remain same in position. Please refer below code snippet,
Code snippet:
|
public class CustoLaneVM : LaneViewModel { double previousHeight; protected override void OnPropertyChanged(string name) { base.OnPropertyChanged(name); if (name == "UnitHeight") { //finding differnce between current lane height and previous height. double heightDifference = this.UnitHeight - previousHeight; // 修复调整的高度过低报错问题 var skipResizing = (this.Children as LaneChildren).Any(e => (e as INode).UnitHeight + heightDifference < (e as INode).MinHeight); if (skipResizing) { this.UnitHeight = previousHeight; } else { foreach (NodeViewModel node in this.Children as LaneChildren) { // 只有搜索到LPR node的时候才会拉伸节点 if (node.Key.ToString() == "LPR" || node.Key.ToString() == "NO_Block1") { //updating height difference to lane's child node and updating OffsetY position according to that. node.LaneOffsetY += (heightDifference * 0.5); node.OffsetY += (heightDifference * 0.5); node.UnitHeight += heightDifference; } } } } previousHeight = this.UnitHeight; } } |
Regards,
Deepa T
You are welcome. Please let us know if you require any further assistance.