|
|
|
Re: SnapToGrid on connection bendpoints [message #183295 is a reply to message #182177] |
Wed, 01 June 2005 02:58 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
Steve, would you care to contribute this to GEF? If so, you can change the
code within the GEF classes themselves (no need to sub-class), and can
create a patch. Post the patch here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=68408
"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:d6s43e$t2s$1@news.eclipse.org...
> Pratik Shah wrote:
>
> > No, bendpoints don't snap at the moment. However, we might add that
> > functionality in the future (there's a bug report open about that, so
you
> > might want to CC yourself to it). Of course, you could implement this
> > yourself. I reckon it won't be too difficult.
>
> I've done just that:
>
> I needed to sub-class BendpointCreationHandle and
> ConnectionBendpointTracker.
>
> In my overloaded BendpointCreationHandle#createDragTracker() method I
return
> an instance of my sub-classed ConnectionBendpointTracker.
>
> In my sub-classed ConnectionBendpointTracker I overload
> ConnectionBendpointTracker#updateSourceRequest().
>
> It's in this method that I get the mouse position and snap it to the grid
> prior to calling BendpointRequest#setLocation(p);
>
> My only problem was I needed to access the viewport layer to find out
where
> the grid is currently on the screen as it changes when the user scrolls
the
> diagram in the viewport.
>
> Steve.
>
> >
> > "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> > news:d6i82b$mh$1@news.eclipse.org...
> >> Hi,
> >>
> >> I have snap-to-grid working on my graphical edit parts but is has no
> > effect
> >> on the positioning of bend points on connections.
> >>
> >> Anyone know if snap-to-grid can be enabled on bend points?
> >>
> >> Thanks, Steve.
>
> --
> Steve Jones
> I.S.Technology Ltd
|
|
|
|
Powered by
FUDForum. Page generated in 0.04084 seconds