Remove magic const '-1' in drag/drop is_sufficient_delta fn
Not sure why this const was ever added in the first place, it appears to arbitrarily prevent drag/drop ops from starting, when the mouse is at coordinate (1,1)
This commit is contained in:
1 parent
8e8c532750
commit
146a136cd5
1 file changed
+6
-6
@@ -323,12 +323,12 @@ namespace mbts.ui {
|
||||
}
|
||||
|
||||
#region Utility
|
||||
public static bool is_sufficient_delta(Point origin, Point current) {
|
||||
return
|
||||
origin.X != -1 && origin.Y != -1 &&
|
||||
(Math.Abs(current.X - origin.X) >= SystemParameters.MinimumHorizontalDragDistance ||
|
||||
Math.Abs(current.Y - origin.Y) >= SystemParameters.MinimumVerticalDragDistance);
|
||||
}
|
||||
|
||||
public static bool is_sufficient_delta(Point start, Point stop) =>
|
||||
is_sufficient_delta(start, stop, SystemParameters.MinimumHorizontalDragDistance, SystemParameters.MinimumVerticalDragDistance);
|
||||
|
||||
public static bool is_sufficient_delta(Point start, Point stop, double min_move_x, double min_move_y) =>
|
||||
Math.Abs(stop.X - start.X) >= min_move_x || Math.Abs(stop.Y - start.Y) >= min_move_y;
|
||||
|
||||
private static void hide(FloatingWindow window, TabDocument document) {
|
||||
if (window.SingleChild) {
|
||||
|
||||
Reference in new issue
Block a user