location problem [message #226541] |
Thu, 16 November 2006 14:27 |
Eclipse User |
|
|
|
Originally posted by: Sferzah.yandex.ru
i have a container element on my diagram.
when i move any elements there - it's ok
when i create elements in root diagram - ok (use the same
CreateNodeCommand)
when i put new element (from palette tools) in my container - this element
appear in container with some offset. When i look in my
CreateNodeCommand.SetLocation - location value is right, but when this
command .Execute() - location value is wrong. Where this value can changed?
|
|
|
|
|
Re: location problem [message #227760 is a reply to message #227701] |
Mon, 11 December 2006 07:47 |
Eclipse User |
|
|
|
Originally posted by: Sferzah.yandex.ru
are you use "subdiagram"?
now i look to this process behavior and what i see.. new element laying on
subdiagram with coordinates from root-diagram
(for example - if you put container to diagram in 100,0 coordinates then
ofsset children will be only horizontal, and if you put child in top-left
container's corner - then child coordinate will be ~100,0)
lets find solution
|
|
|
Re: location problem [message #227765 is a reply to message #227760] |
Mon, 11 December 2006 08:03 |
Eclipse User |
|
|
|
Originally posted by: Sferzah.yandex.ru
so.. in XYLayoutEditPolicyImpl.getCreateCommand (and other commands if
required)
IFigure pane = ((AbstractGraphicalEditPart)getHost()).getContentPane();
Point p = request.getLocation();
pane.translateToRelative(p);
and command.setLocation(p);
it's work to me
|
|
|
|
Powered by
FUDForum. Page generated in 0.03796 seconds