Commit fea78532 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49214 954022d7-b5bf-4e40-9824-e11837661b57
parent a2c974d2
......@@ -682,7 +682,7 @@ CAutoshapeTrack.prototype =
/*************************************************************************/
/******************************** TRACKS *********************************/
/*************************************************************************/
DrawTrack : function(type, matrix, left, top, width, height, isLine)
DrawTrack : function(type, matrix, left, top, width, height, isLine, isCanRotate)
{
// с самого начала нужно понять, есть ли поворот. Потому что если его нет, то можно
// (и нужно!) рисовать все по-умному
......@@ -766,7 +766,7 @@ CAutoshapeTrack.prototype =
var xC = ((x1 + x2) / 2) >> 0;
if (!isLine)
if (!isLine && isCanRotate)
{
ctx.moveTo(xC + 0.5, y1);
ctx.lineTo(xC + 0.5, y1 - TRACK_DISTANCE_ROTATE);
......@@ -800,7 +800,7 @@ CAutoshapeTrack.prototype =
ctx.fill();
ctx.stroke();
if (!isLine)
if (!isLine && isCanRotate)
{
ctx.beginPath();
overlay.AddEllipse(xC, y1 - TRACK_DISTANCE_ROTATE, TRACK_CIRCLE_RADIUS);
......@@ -839,7 +839,7 @@ CAutoshapeTrack.prototype =
var xc1 = (x1 + x2) / 2;
var yc1 = (y1 + y2) / 2;
if (!isLine)
if (!isLine && isCanRotate)
{
ctx.beginPath();
......@@ -872,7 +872,7 @@ CAutoshapeTrack.prototype =
ctx.fill();
ctx.stroke();
if (!isLine)
if (!isLine && isCanRotate)
{
ctx.beginPath();
overlay.AddEllipse(xc1 + ex2 * TRACK_DISTANCE_ROTATE, yc1 + ey2 * TRACK_DISTANCE_ROTATE, TRACK_CIRCLE_RADIUS);
......@@ -898,11 +898,16 @@ CAutoshapeTrack.prototype =
ctx.strokeStyle = _style_blue;
ctx.stroke();
if (isCanRotate)
{
ctx.beginPath();
var xC = ((x1 + x2) / 2) >> 0;
ctx.moveTo(xC + 0.5, y1);
ctx.lineTo(xC + 0.5, y1 - TRACK_DISTANCE_ROTATE);
ctx.stroke();
}
ctx.beginPath();
......@@ -927,12 +932,15 @@ CAutoshapeTrack.prototype =
ctx.fill();
ctx.stroke();
if (isCanRotate)
{
ctx.beginPath();
overlay.AddEllipse(xC, y1 - TRACK_DISTANCE_ROTATE, TRACK_CIRCLE_RADIUS);
ctx.fillStyle = _style_green;
ctx.fill();
ctx.stroke();
}
ctx.beginPath();
}
......@@ -953,14 +961,18 @@ CAutoshapeTrack.prototype =
var ex2 = (x1 - x3) / _len_y;
var ey2 = (y1 - y3) / _len_y;
ctx.beginPath();
var xc1 = (x1 + x2) / 2;
var yc1 = (y1 + y2) / 2;
if (isCanRotate)
{
ctx.beginPath();
ctx.moveTo(xc1, yc1);
ctx.lineTo(xc1 + ex2 * TRACK_DISTANCE_ROTATE, yc1 + ey2 * TRACK_DISTANCE_ROTATE);
ctx.stroke();
}
ctx.beginPath();
......@@ -982,12 +994,15 @@ CAutoshapeTrack.prototype =
ctx.fill();
ctx.stroke();
if (isCanRotate)
{
ctx.beginPath();
overlay.AddEllipse(xc1 + ex2 * TRACK_DISTANCE_ROTATE, yc1 + ey2 * TRACK_DISTANCE_ROTATE, TRACK_CIRCLE_RADIUS);
ctx.fillStyle = _style_green;
ctx.fill();
ctx.stroke();
}
ctx.beginPath();
}
......
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