Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » creating bend point - zoom problem
creating bend point - zoom problem [message #1403194] Tue, 22 July 2014 10:01 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 549
Registered: June 2011
Senior Member
If i create a bend point in the connection when the zoom is not 100% then bendpoint end end in a weird position. If zoom is 100% then every thing works fine.

How should i handle zoom when creating bending points?

Re: creating bend point - zoom problem [message #1420003 is a reply to message #1403194] Tue, 09 September 2014 11:18 Go to previous message
Maarten Bezemer is currently offline Maarten BezemerFriend
Messages: 117
Registered: February 2012
Senior Member
You have to translate the screen/absolute coordinates (from #getLocation()) to relative coordinates. Assuming you have a BendpointEditPolicy set up, you need something like this to translate the coordinates:

protected Command getCreateBendpointCommand(final BendpointRequest request)
    Point p = request.getLocation();
    ConnectionEditPart source = request.getSource();

    return new YourBendPointCreateCommand(source.getModel(), request.getIndex(), p);

Previous Topic:[ZEST] custom layout class access restriction
Next Topic:Weird Node Resizing Problem
Goto Forum:

Current Time: Fri Oct 09 17:56:31 GMT 2015

Powered by FUDForum. Page generated in 0.02335 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software