Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrange Icons Alphabetically/Numerically in layout (Read 2369 times)
craigsimons
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Oct 17th, 2005
Arrange Icons Alphabetically/Numerically in layout
Oct 28th, 2005 at 8:52pm
Print Post  
Is it possible to sort icons alphabetically/numerically when applying a layout. For instance, I would like to arrange in a 'layered' format, where each layer would be arranged depending on it's icon txt/tag/etc. Can this be done?
  
Back to top
 
IP Logged
 
Iva
Junior Member
**
Offline


MindFusion support

Posts: 55
Joined: Aug 6th, 2005
Re: Arrange Icons Alphabetically/Numerically in la
Reply #1 - Oct 31st, 2005 at 5:48am
Print Post  
The aim of most of the graph layout classes, including the 'layered' one, is to minimize the distance between nodes. Using a fixed sort order of nodes in a layer would prevent the layout routines achieve their goal so there isn't any intrinsic support for that.

You could run post-processing code on the graph after the layout completes and swap nodes on the same layer so they are sorted. I.e. for all nodes having the same Y position, swap their X positions. But that could make the links between layers longer and make them cross each other.

You could explicitly set the order of items in TreeLayouts by setting the order of Arrow objects in the box' OutgoingArrows collections. The TreeLayout follows the order of the outgoing links, so it will arrange the branches coming out from a node in that same order.
  
Back to top
 
IP Logged
 
craigsimons
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Oct 17th, 2005
Re: Arrange Icons Alphabetically/Numerically in la
Reply #2 - Oct 31st, 2005 at 4:18pm
Print Post  
Hmm... I'll probably implement some sort of post-processing routine to sort this out. Thanks for the reply!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint