Commit 0b89449f authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent a724c3e0
......@@ -95098,6 +95098,11 @@ function HitInLine(context, px, py, x0, y0, x1, y1)
d *= global_mouseEvent.KoefPixToMM;
}
if (undefined !== window.AscHitToHandlesEpsilon)
{
d = window.AscHitToHandlesEpsilon/Math.sqrt(tx*tx+ty*ty);
}
dx=-ty*d;
dy=tx*d;
......@@ -95130,6 +95135,11 @@ function HitInBezier4(context, px, py, x0, y0, x1, y1, x2, y2, x3, y3)
d *= global_mouseEvent.KoefPixToMM;
}
if (undefined !== window.AscHitToHandlesEpsilon)
{
d = window.AscHitToHandlesEpsilon/Math.sqrt(tx*tx+ty*ty);
}
dx=-ty*d;
dy=tx*d;
......@@ -95162,6 +95172,11 @@ function HitInBezier3(context, px, py, x0, y0, x1, y1, x2, y2)
d *= global_mouseEvent.KoefPixToMM;
}
if (undefined !== window.AscHitToHandlesEpsilon)
{
d = window.AscHitToHandlesEpsilon/Math.sqrt(tx*tx+ty*ty);
}
dx=-ty*d;
dy=tx*d;
......@@ -95471,6 +95486,16 @@ function hitToHandles(x, y, object)
}
}
// теперь смотрим расстояние до центра фигуры, чтобы можно было двигать маленькую
dist_x = t_x - hc;
dist_y = t_y - vc;
_tmp_dist = dist_x * dist_x + dist_y * dist_y;
if (_tmp_dist < _min_dist && !check_line)
{
_min_dist = _tmp_dist;
_ret_value = -1;
}
if (_min_dist < radius)
return _ret_value;
......@@ -357393,7 +357418,7 @@ CDrawingDocument.prototype =
if (this.Native["GetDeviceDPI"])
{
// 1см
window.AscHitToHandlesEpsilon = 10 * this.Native["GetDeviceDPI"]() / (25.4 * this.Native["DD_GetDotsPerMM"]() );
window.AscHitToHandlesEpsilon = 5 * this.Native["GetDeviceDPI"]() / (25.4 * this.Native["DD_GetDotsPerMM"]() );
}
var _isDrawings = this.LogicDocument.DrawingObjects.isPointInDrawingObjects2(pos.X, pos.Y, pos.Page, true);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment