|REQ_MOVE and overlapping Layers problem [message #231560]
||Sat, 10 March 2007 18:59
Originally posted by: kvdijken.tiscali.nl|
I have a problem with overlapping layers and moving figures within their parentlayer.
I have two Layers which overlap each other completely. Each of these Layers have Figures on them
which may be dragged. Dropping may only occur on their own Layer, ie., they may not be reparented,
only moved within their own parent.
When the DragEditPartsTracker is looking for a target editpart (in updateTargetUnderMouse()) it will
return the first of these Layers it encounters in its search. This may be the wrong layer. This
results in the wrong requests being generated (REQ_ADD instead of REQ_MOVE).
I tried several options:
1. create my own DragEditPartsTracker which in its activate() after calling super.activate() calls
lockTargetEditPart(layerEditPart). This does not work because calling lockTargetEditPart implicitly
initializes the operationSet which can't be done because the DragEditPartsTracker does not have a
viewer yet. That is only set after activation.
2. create my own DragEditPartsTracker with overrides for isMove() and getTargetEditPart(). This
seems to work but looks rather clumsy to me.
I have got the feeling that it could be done a bit simpler. Is that right?
Powered by FUDForum
. Page generated in 0.01944 seconds