public override MapViewer.DragAction LeftButtonDown(Pane pane, PointF location, float pixelSize, ref bool displayUpdateNeeded)
{
if (pane != Pane.Map)
return MapViewer.DragAction.None;
PointF handleLocation;
// Area we initiating a drag of a corner/side?
if (HitTestHandle(location, pixelSize, out handleLocation, out cursorDrag)) {
// being dragging the corner
draggingHandle = true;
startDrag = location;
handleDrag = handleLocation;
dragStartCourseObj = (SelectingRectangleCourseObj) selectingCourseObj.Clone();
displayUpdateNeeded = true;
return MapViewer.DragAction.ImmediateDrag;
}
// Are we initiating a drag of the whole object?
if (HitTestDraggable(location, pixelSize)) {
// Begin dragging the clicked object.
draggingWhole = true;
startDrag = location;
dragStartCourseObj = (SelectingRectangleCourseObj) selectingCourseObj.Clone();
displayUpdateNeeded = true;
return MapViewer.DragAction.ImmediateDrag;
}
return MapViewer.DragAction.None;
}