Bug #57464 Support more layout tools
Submitted: 14 Oct 2010 18:13 Modified: 14 Oct 2010 19:01
Reporter: Tony Freixas Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S4 (Feature request)
Version:5.2.28CE OS:Any
Assigned to: CPU Architecture:Any
Tags: layout

[14 Oct 2010 18:13] Tony Freixas
Description:
I was just trying to line up some objects on the diagram and found the whole process to be rather awkward. The are a standard set of layout tools use by many applications and Workbench should consider adding these. Once more than one object is selected:

* Line up tops
* Line up vertical centers
* Line up bottoms

* Line up left sides
* Line up horizontal centers
* Line up right sides

* Size to widest
* Size to narrowest
* Size to tallest
* Size to shortest

* Distribute tops evenly
* Distribute vertical centers evenly
* Distribute bottoms evenly

* Distribute left sides evenly
* Distribute horizontal centers evenly
* Distribute right sides evenly

* Snap to grid (i.e. snap the selected items to the grid)

Speaking of the grid, you should also allow the grid spacing to be altered.

How to repeat:
.

Suggested fix:
Add the suggested layout tools.
[14 Oct 2010 18:21] Johannes Taxacher
these features should not be very hard to implemented as plugins
[14 Oct 2010 19:01] Tony Freixas
@Johannes Taxacher: That's what I thought until I looked at the choices of scripting languages and submitted bug #57460. It's not hard IF you know Python or Lua AND you know all the interfaces needed to peform the operation and provide a decent GUI for it.

I hope you meant that it won't be hard for someone on the Workbench team to write the plugin. Note that I mention providing a decent GUI. Selecting a set of objects and then going to the Plugins menu and selecting a function from there is not the proper solution. When someone selects multiple objects, a toolbar should appear with icons for each of the layout options. The Photoshop GUI would be a good one to copy. 

These layout options should be 1st class tools with the icons appearing (or always present and grayed out when not applicable) so that people are aware that the exist. 

If this can be done using the plugin interface, that would be great. If it's a simple matter for someone to do, so much the better. I'll expect the plugin tomorrow. :-)