We have been using your window library for a number of years, and really like it. We are now adding a Database/Table diagram using your Diagram control and are having some
real issues with the layout. At this point in the development we are only adding the table objects, and next will move on to adding connections.
Our issue is that the diagram is moving the tables from where we are placing them on the dialog. For background, we are creating our own table figure as a group. The group is comprised of a color coded rectangle the is overlaid with the table Name and rows of field names. Each is created separately as a single group with the upper left corner at 0,0. Once the group is created, the PinPoint is set to move the table into the correct location in a grid arrangement. When a single row gets too wide (around 2000 pixels) we move down to the next row. Since each table has a different number of fields, each table may have a different height, but each table in a row should have matching top Y values, and each table has an identical width;
Once all of the tables have been placed, it appears that the diagram manager moves them to a different location. Typically this is a vertical movement, but at times it is also horizontal to the point that two tables partially overlaid.
We are not using any of your layout managers at this point. However, since it is unknown how large the diagram will be, we initially set a size of 25,000 x 25,000 pixels.
Once created we issue the "SizeToFitContent". We have attempted to block that re-size call to see if it is the cause, but no joy.
For your review here is a listing of the first few tables added. A full database diagram may have up to 200 tables The first group of this listing reflects where we initially placed the table groups. As soon as the tables have created/placed we have looped back through the diagram and interrogated where the node now are. That is reflected in the second listing below.
================================== initial node creation pass ========================================
================================== initial node creation pass ========================================
================================== initial node creation pass ========================================
table[AuthorizationForm] PinPoint[10,10]
table[AuthorizationFormConsent] PinPoint[320,10]
table[AuthorizationFormDataUse] PinPoint[630,10]
table[AuthorizationFormText] PinPoint[940,10]
table[ConsumptionRate] PinPoint[1250,10]
table[ContentDocument] PinPoint[1560,10]
table[ContentVersion] PinPoint[1870,10]
Our assumption is that the PinPoint is specified as an X/Y location. Our other assumption is that the PinPoint represents the upper left cornet of the figure.
================================ the nodes appear to be moving - loop back through and ask the Diagram where they are =================
================================ the nodes appear to be moving - loop back through and ask the Diagram where they are =================
================================ the nodes appear to be moving - loop back through and ask the Diagram where they are =================
============= the following is a query to the diagram immediately after the above nodes have been created ================================
name[AuthorizationForm node name[AuthorizationForm] PinPoint[{X=135, Y=250}] <===== initial pinpoint was PinPoint[10,10]
name[AuthorizationFormConsent node name[AuthorizationFormConsent] PinPoint[{X=135, Y=250}] <===== initial pinpoint was PinPoint[320,10]
name[AuthorizationFormDataUse node name[AuthorizationFormDataUse] PinPoint[{X=135, Y=220}] <===== initial pinpoint was PinPoint[630,10]
name[AuthorizationFormText node name[AuthorizationFormText] PinPoint[{X=135, Y=230}] <===== initial pinpoint was PinPoint[940,10]
name[ConsumptionRate node name[ConsumptionRate] PinPoint[{X=135, Y=240}] <===== initial pinpoint was PinPoint[1250,10]
name[ContentDocument node name[ContentDocument] PinPoint[{X=135, Y=340}] <===== initial pinpoint was PinPoint[1560,10]
name[ContentVersion node name[ContentVersion] PinPoint[{X=135, Y=510}] <===== initial pinpoint was PinPoint[1870,10]
You will observe that in this 2nd listing, ALL of the X coordinates are 135, and the Y coordinates are quite random.
Do you have any suggestions?