Commit 2cb99333 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent 6d8fb223
......@@ -357044,8 +357044,17 @@ CDrawingDocument.prototype =
}
var _selectCircleEpsMM = 10; // 1cm;
var _selectCircleEpsMM_square = _selectCircleEpsMM * _selectCircleEpsMM;
if (Math.abs(pos.X - _circlePos1_x) < _selectCircleEpsMM && Math.abs(pos.Y - _circlePos1_y) < _selectCircleEpsMM)
var _distance1 = ((pos.X - _circlePos1_x) * (pos.X - _circlePos1_x) + (pos.Y - _circlePos1_y) * (pos.Y - _circlePos1_y));
var _distance2 = ((pos.X - _circlePos2_x) * (pos.X - _circlePos2_x) + (pos.Y - _circlePos2_y) * (pos.Y - _circlePos2_y));
var candidate = 1;
if (_distance2 < _distance1)
candidate = 2;
if (1 == candidate && _distance1 < _selectCircleEpsMM_square)
{
this.SelectClearLock = true;
this.SelectDrag = 1;
......@@ -357081,7 +357090,7 @@ CDrawingDocument.prototype =
this.SelectClearLock = false;
}
if (Math.abs(pos.X - _circlePos2_x) < _selectCircleEpsMM && Math.abs(pos.Y - _circlePos2_y) < _selectCircleEpsMM)
if (2 == candidate && _distance2 < _selectCircleEpsMM_square)
{
this.SelectClearLock = true;
this.SelectDrag = 2;
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