Ticket #25 (assigned enhancement)

Opened 1 year ago

Last modified 1 month ago

Snap to edges

Reported by: li..@plone.org Assigned to: arj..@yirdis.nl (accepted)
Priority: minor Milestone: Gaphas 0.4.0
Component: Gaphas Version: Gaphor 0.10.4
Keywords: Cc:

Description (Last modified by arj..@yirdis.nl)

I know this request is probably a bit down the line, but the one thing that annoys me about all UML editors is that they have very poor alignment support.

If you have ever used a product like OmniGraffle? or other graphing products, you have seen this in action. It shows you guides along the edges when you move an object, making it easier to align them to each other.

The "poor man's solution" for this is something like snap-to-grid, which would also be useful (but less fancy and still requires manual inspection).

Attachments

Change History

04/15/07 23:31:18 changed by arj..@yirdis.nl

  • status changed from new to assigned.
  • version set to 0.10.4.

07/08/07 01:32:19 changed by anonymous

  • cc set to painting.
  • keywords set to wine.
  • priority changed from minor to critical.
  • summary changed from Snap to edges to wine.
  • milestone set to Gaphor 0.11.0.

07/08/07 01:32:47 changed by anonymous

  • priority changed from critical to trivial.
  • type changed from enhancement to defect.
  • version changed from Gaphor 0.10.4 to Gaphas 0.1.4.
  • component changed from Gaphas to Gaphor.
  • milestone changed from Gaphor 0.11.0 to Gaphor 1.0.

07/11/07 06:13:25 changed by anonymous

  • keywords changed from wine to game.
  • priority changed from trivial to major.
  • summary changed from wine to game.
  • version deleted.
  • milestone changed from Gaphor 1.0 to Gaphas 1.0.

07/12/07 00:10:16 changed by anonymous

  • priority changed from major to minor.
  • component changed from Gaphor to Gaphas.
  • milestone deleted.

07/17/07 01:02:12 changed by arj..@yirdis.nl

  • cc deleted.
  • component changed from Gaphas to Gaphor.
  • summary changed from game to Snap to edges.
  • version set to Gaphor 0.10.4.
  • keywords deleted.
  • type changed from defect to enhancement.

undone misuse

12/18/07 00:54:15 changed by arj..@yirdis.nl

  • component changed from Gaphor to Gaphas.
  • description changed.
  • milestone set to Gaphas 0.3.5.

I think it would be nice to have such a feature. Personally I'm quite fond of the solution Apple uses in Pages (when aligning images draw blue guides when aligning to the left/centre/right/top/middle/bottom of some other element.

Idea:

  • When moving Elements around it should align boundaries (x, y, width, height) to other Elements.
  • When moving only a single handle the handle corner should only be aligned to other Elements.

Although the class is currently declared as Tool, it should actually be possible to apply the code to different tools (like a decorator or as a function called from within the Tool's motion handler). It should be enough to align !Handles only. Each handle will use a !Projection (from solver.py) to obtain the canvas coordinates for the handle. A result will be that only orthogonal alignment is possible, which should be enough for now.

This looks like quite a resource intensive task and may be better performed asynchronously, using a (low priority) idle job.

Another idea: can't we implement this as an extension to the constraint solver? This is probably no such a good idea as it requires a lot of conditional constraints.

04/07/08 02:32:40 changed by arj..@yirdis.nl

We should probably implement this using some Rules. Each rule is like a constraint, but not quite the same. Where constraints work specifically on a set of Variables, Rules work on specific Item types and take all (possibly) items on the Canvas into account.


Add/Change #25 (Snap to edges)