Commit 98910674 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

isPointInDrawingObjects2

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58601 954022d7-b5bf-4e40-9824-e11837661b57
parent 3b6dfb00
......@@ -14,6 +14,11 @@ function hitToHandles(x, y, object)
t_y = invert_transform.TransformPointY(x, y);
var radius = object.convertPixToMM(TRACK_CIRCLE_RADIUS);
if(typeof global_mouseEvent !== "undefined" && isRealObject(global_mouseEvent) && isRealNumber(global_mouseEvent.KoefPixToMM))
{
radius *= global_mouseEvent.KoefPixToMM;
}
var check_line = CheckObjectLine(object);
var sqr_x = t_x * t_x, sqr_y = t_y * t_y;
if (Math.sqrt(sqr_x + sqr_y) < radius)
......
"use strict";
function HitInLine(context, px, py, x0, y0, x1, y1)
{
/* var l = Math.min(x0, x1);
......@@ -14,6 +15,11 @@ function HitInLine(context, px, py, x0, y0, x1, y1)
d=1.5/Math.sqrt(tx*tx+ty*ty);
if(typeof global_mouseEvent !== "undefined" && isRealObject(global_mouseEvent) && isRealNumber(global_mouseEvent.KoefPixToMM))
{
d *= global_mouseEvent.KoefPixToMM;
}
dx=-ty*d;
dy=tx*d;
......@@ -41,6 +47,11 @@ function HitInBezier4(context, px, py, x0, y0, x1, y1, x2, y2, x3, y3)
d=1.5/Math.sqrt(tx*tx+ty*ty);
if(typeof global_mouseEvent !== "undefined" && isRealObject(global_mouseEvent) && isRealNumber(global_mouseEvent.KoefPixToMM))
{
d *= global_mouseEvent.KoefPixToMM;
}
dx=-ty*d;
dy=tx*d;
......@@ -68,6 +79,11 @@ function HitInBezier3(context, px, py, x0, y0, x1, y1, x2, y2)
d=1.5/Math.sqrt(tx*tx+ty*ty);
if(typeof global_mouseEvent !== "undefined" && isRealObject(global_mouseEvent) && isRealNumber(global_mouseEvent.KoefPixToMM))
{
d *= global_mouseEvent.KoefPixToMM;
}
dx=-ty*d;
dy=tx*d;
......
......@@ -2144,9 +2144,9 @@ CGraphicObjects.prototype =
return -1;
},
isPointInDrawingObjects2: function(x, y, pageIndex, epsilon)
isPointInDrawingObjects2: function(x, y, pageIndex)
{
return this.isPointInDrawingObjects(x, y, pageIndex, epsilon)
return this.isPointInDrawingObjects(x, y, pageIndex) > 0;
},
......
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