Skip to content
Snippets Groups Projects
Commit e2f2ed33 authored by Johannes Eder's avatar Johannes Eder
Browse files

allocation target bounds

refs 2446
parent 5aa8f8c7
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ public abstract class AllocationConnectionEditPartBase<T extends ConnectionSegme
protected AllocationConnectionEditPartBase(T modelElement,
IDiagramLayoutConfiguration layoutConfiguration) {
super(modelElement, layoutConfiguration);
}
/** {@inheritDoc} */
......
......@@ -137,6 +137,10 @@ public abstract class AllocationElementEditPartBase<T extends ILayoutedModelElem
.reduce(new Rectangle(), (a, b) -> a.union(b));
if(isAllocationTargetElement()) {
r = IAllocationPosition.allocationTargetElementBounds(r);
targetAllocationBounds.x = reduce.x;
targetAllocationBounds.y = reduce.y;
targetAllocationBounds.width = reduce.width;
targetAllocationBounds.height = reduce.height;
} else {
sourceAllocationBounds.height = reduce.height;
sourceAllocationBounds.width = reduce.width;
......
......@@ -32,6 +32,9 @@ public interface IAllocationPosition {
/** Stores the bounds of the source of the allocation in the editor. */
static Rectangle sourceAllocationBounds = new Rectangle();
/** Stores the bounds of the target of the allocation in the editor. */
static Rectangle targetAllocationBounds = new Rectangle();
/** Returns true if T is the target of the allocation, otherwise false. */
public boolean isAllocationTargetElement();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment