Problem with grouping two objects. It seems the smaller of the two objects gets sent to the back in some cases.
Steps to reproduce:
1) Create a large triange.
2) Create a small textbox away from the triangle and type in some text.
3) Drag the text box on top of the triangle and group the two objects.
The text box should disappear behind the triangle and this happens with all objects.
If you create the text object within a triangle and then group them it will stay on top.
ADAdministrator Syncfusion Team August 18, 2004 06:52 AM
I was unable to reproduce the problem in the DiagramBuilder sample, using the 220.127.116.11 version of Essential Diagram. Which version of Essential Diagram are you currently using?
ADAdministrator Syncfusion Team August 18, 2004 07:02 AM
From the accompanying Readme file:
[Essential Suite 18.104.22.168 Read Me]
I just started up the Diagram Builder sample and was able to easily reproduce the problem.
The main thing is the make sure the textbox is smaller than the triangle, then drag it into the middle of the triangle, select them both using the shift key and select Group button.
This will make the text box move to the back so you cant see it.
Please let me know if you need any further information.
ADAdministrator Syncfusion Team August 19, 2004 12:09 PM
Yes, I could reproduce the behavior. I could not see it before as I was using the mouse to select both the nodes, instead of control-left mouse click.
The reason for the behavior is due to the order of adding/selecting nodes in the Diagram:
a) Draw the bigger triangle and then the smaller textnode. Move the textnode over the Triangle.
- Click on the Diagram surface, then select the triangle and then the textnode and then group them. The textnode will be on top of the Triangle.
- If you ungroup and then select the textnode and then the triangle the triangle will be on top and the textnode will be below it.
b) If you draw the textnode first and then the Triangle, you will notice that the textnode will be below the Triangle.
As you can see the z-order of the nodes in a layer depends on how they are created and for a selection the order in which they are selected. There is a Bring to Front Tool right next to the Ungroup Tool and you can use this promote/demote the selected node(s) in the Z-order. (Diagram control''s Controller class''s BringToFront() SendtoBack() methods.)
I also tried adding nodes and moving nodes over in Visio and the behavior is similar and controlled by the z-order.
ADAdministrator Syncfusion Team August 19, 2004 12:13 PM
It seems that the order in which the objects are selected is the determining factor.
If the text item is selected first and then the triangle and then they are grouped the text item will be rendered further back in the z-order even though it was previously at the top.
ADAdministrator Syncfusion Team August 19, 2004 12:15 PM
We must have posted at exactly the same time :)
You also discovered the z-order problem.
Best regards and thank you,
ADAdministrator Syncfusion Team August 19, 2004 12:35 PM
Would it not be more intuitive to have grouping retain the layer nodes z-order and not the selected z-order?
When you group items you do expect then to remain on top if they are already on top.
I just checked Visio myself and it performs correctly in my opinion. Its disregards the selected order when grouping.
ADAdministrator Syncfusion Team August 20, 2004 09:35 AM
Yes, you are correct and I did discuss this with the Essential Diagram team and they have asked me to create a QA incident on this issue.