|FixPointAnchorEditPart does not override getDragTracker [message #756684]
||Mon, 14 November 2011 16:33
| Hernan Gonzalez
Registered: October 2010
Location: Buenos Aires, Argentina
Because FixPointAnchorEditPart does not override getDragTracker, (as does BoxRelativeAnchorEditPart) the drag-and-drop features (as the connection creation, as explained in the tutorial) don't work with FixPointAnchors, only with BoxRelativeAnchor. Seems a bug to me.|
I made a blind copy-paste from BoxRelativeAnchorEditPart.getDragTracker() and it worked , but perhaps there're are subtle issues I'm missing. In any case, it would be ugly to have this code duplication.
More in general, I'm not very confortable with FixPointAnchor/BoxRelativeAnchor being different classes (and with its editpart counterparts), is that really necesary? Their difference, to me, is just a different algorithm for computing its position, which could be more simply specified as a boolean property, or by different position fields.
Apart from implementation simplicity, it's also a flexibility thing.
Case in point: in my application I wanted an anchor to be placed at an absolute vertical position, and a relative horizontal position (say, on the left and right sides of a rectangle which width -only- is resizable). My ideal would have been an anchor that allows to specifiy a fixed vertical position and a relative horizontal position. Which now is impossible, of course.
[Updated on: Mon, 14 November 2011 16:33]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.13829 seconds