Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Page breaks (Read 1157 times)
JohnJay
YaBB Newbies
*
Offline



Posts: 3
Joined: Jun 23rd, 2009
Page breaks
Aug 6th, 2009 at 4:02pm
Print Post  
Hi

I have developed my database design diagram.  This contains a series of TableNodes and links to show the relationships.

When I come to print it, if the diagram is too big for the page, I don't really want nodes to be positioned on a page break.  Is there any way to acheive this.

I guess the hard way would be to programmatically loop around all the table nodes, check to see if they have a particular x,y co-ordinate that would mean they are on a page break, (based on my supplying what the page size would be) and then moving them if they do. 



Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Page breaks
Reply #1 - Aug 6th, 2009 at 7:26pm
Print Post  
Hi,

If you let your users design the diagram, you could handle the DrawBackground event to render page breaks on the canvas and let the user choose where to place tables relatively to a break.

Doing this programmatically should be easy if you add the table to two collections and sort them, one by the X position of tables and the other one by Y. Iterate over each collection and when you detect that a table overlaps a page break, add some offset to its X or Y so it moves to the next page, and add the same offset to all tables further in the collection to make sure they don't overlap with the current one.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint