@Override
public void onDragStart(DragStartEvent event) {
endPointDragging = true;
if (event != null) {
EndPoint ep = (EndPoint) event.getSource();
ep.connector.select();
}
int startX =
Diagram.this.boundaryPanel.getWidgetLeft(event.getContext().draggable)
- Diagram.this.boundaryPanel.getAbsoluteLeft();
int startY =
Diagram.this.boundaryPanel.getWidgetTop(event.getContext().draggable)
- Diagram.this.boundaryPanel.getAbsoluteTop();
Diagram.this.onElementDrag(new ElementDragEvent(event.getContext().draggable, startX, startY,
ElementDragEvent.DragEventType.DRAG_START));
}
@Override
public void onDragEnd(DragEndEvent event) {
endPointDragging = false;
EndPoint endPoint = (EndPoint) event.getSource();
endPoint.connector.fixEndSectionDirection(endPoint);
endPoint.connector.drawSections(endPoint.connector.getCorners());
try {
endPoint.connector.cornerPoints =