Commit 948693ae authored by Oleg Korshul's avatar Oleg Korshul

.

parent 3e7c331f
...@@ -3760,7 +3760,7 @@ function CDrawingDocument() ...@@ -3760,7 +3760,7 @@ function CDrawingDocument()
if (type == c_oContentControlTrack.In) if (type == c_oContentControlTrack.In)
this.ContentControlObject = { id : id, page : page, rect : rect }; this.ContentControlObject = { id : id, page : page, rect : rect };
var overlay = this.m_oHtmlPage.m_oOverlayApi; var overlay = this.m_oWordControl.m_oOverlayApi;
var ctx = overlay.m_oContext; var ctx = overlay.m_oContext;
ctx.strokeStyle = "#ADADAD"; ctx.strokeStyle = "#ADADAD";
...@@ -3774,9 +3774,11 @@ function CDrawingDocument() ...@@ -3774,9 +3774,11 @@ function CDrawingDocument()
ctx.beginPath(); ctx.beginPath();
var _x, _y, _r, _b; var _x, _y, _r, _b, rect;
for (var i = 0; i < rects.length; i++) var _rects_len = rects.length;
for (var i = 0; i < _rects_len; i++)
{ {
rect = rects[i];
_x = (drPage.left + dKoefX * rect.X); _x = (drPage.left + dKoefX * rect.X);
_y = (drPage.top + dKoefY * rect.Y); _y = (drPage.top + dKoefY * rect.Y);
_r = (drPage.left + dKoefX * rect.R); _r = (drPage.left + dKoefX * rect.R);
...@@ -3792,7 +3794,7 @@ function CDrawingDocument() ...@@ -3792,7 +3794,7 @@ function CDrawingDocument()
if (_b > overlay.max_y) if (_b > overlay.max_y)
overlay.max_y = _b; overlay.max_y = _b;
ctx.rect((_x >> 0) + 0.5, (_y >> 0) + 0.5, (_r - _x) >> 0, (_b - _t) >> 0); ctx.rect((_x >> 0) + 0.5, (_y >> 0) + 0.5, (_r - _x) >> 0, (_b - _y) >> 0);
} }
if (type == c_oContentControlTrack.Hover) if (type == c_oContentControlTrack.Hover)
...@@ -3806,7 +3808,30 @@ function CDrawingDocument() ...@@ -3806,7 +3808,30 @@ function CDrawingDocument()
if (type == c_oContentControlTrack.In) if (type == c_oContentControlTrack.In)
{ {
rect = rects[0];
_x = (drPage.left + dKoefX * rect.X);
_y = (drPage.top + dKoefY * rect.Y);
_x = ((_x >> 0) + 0.5);
_y = ((_y >> 0) + 0.5) - 15;
ctx.rect(_x, _y, 20, 15);
ctx.stroke();
ctx.beginPath();
var cx = _x - 0.5 + 4;
var cy = _y - 0.5 + 4;
overlay.AddRect(cx, cy, 3, 3);
overlay.AddRect(cx + 5, cy, 3, 3);
overlay.AddRect(cx + 10, cy, 3, 3);
overlay.AddRect(cx, cy + 5, 3, 3);
overlay.AddRect(cx + 5, cy + 5, 3, 3);
overlay.AddRect(cx + 10, cy + 5, 3, 3);
ctx.fillStyle = "#ADADAD";
ctx.fill();
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