Commit 3eed5010 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@59213 954022d7-b5bf-4e40-9824-e11837661b57
parent afc1e5b0
...@@ -2684,6 +2684,8 @@ function CDrawingDocument(drawingObjects) ...@@ -2684,6 +2684,8 @@ function CDrawingDocument(drawingObjects)
_offY = this.AutoShapesTrack.Graphics.m_oCoordTransform.ty; _offY = this.AutoShapesTrack.Graphics.m_oCoordTransform.ty;
} }
var _factor = AscBrowser.isRetina ? 1 : 0;
if (null != this.TextMatrix && !global_MatrixTransformer.IsIdentity2(this.TextMatrix)) if (null != this.TextMatrix && !global_MatrixTransformer.IsIdentity2(this.TextMatrix))
{ {
var _x1 = this.TextMatrix.TransformPointX(x, y); var _x1 = this.TextMatrix.TransformPointX(x, y);
...@@ -2695,8 +2697,8 @@ function CDrawingDocument(drawingObjects) ...@@ -2695,8 +2697,8 @@ function CDrawingDocument(drawingObjects)
var pos1 = { X : _offX + dKoef * _x1, Y : _offY + dKoef * _y1 }; var pos1 = { X : _offX + dKoef * _x1, Y : _offY + dKoef * _y1 };
var pos2 = { X : _offX + dKoef * _x2, Y : _offY + dKoef * _y2 }; var pos2 = { X : _offX + dKoef * _x2, Y : _offY + dKoef * _y2 };
_newW = (Math.abs(pos1.X - pos2.X) >> 0) + 1; _newW = (((Math.abs(pos1.X - pos2.X) >> 0) + 1) >> 1) << 1;
_newH = (Math.abs(pos1.Y - pos2.Y) >> 0) + 1; _newH = (((Math.abs(pos1.Y - pos2.Y) >> 0) + 1) >> 1) << 1;
if (2 > _newW) if (2 > _newW)
_newW = 2; _newW = 2;
...@@ -2710,8 +2712,8 @@ function CDrawingDocument(drawingObjects) ...@@ -2710,8 +2712,8 @@ function CDrawingDocument(drawingObjects)
} }
else else
{ {
this.TargetHtmlElement.style.width = _newW + "px"; this.TargetHtmlElement.style.width = (_newW >> _factor) + "px";
this.TargetHtmlElement.style.height = _newH + "px"; this.TargetHtmlElement.style.height = (_newH >> _factor) + "px";
this.TargetHtmlElement.width = _newW; this.TargetHtmlElement.width = _newW;
this.TargetHtmlElement.height = _newH; this.TargetHtmlElement.height = _newH;
...@@ -2743,8 +2745,8 @@ function CDrawingDocument(drawingObjects) ...@@ -2743,8 +2745,8 @@ function CDrawingDocument(drawingObjects)
ctx.stroke(); ctx.stroke();
} }
this.TargetHtmlElement.style.left = Math.min(pos1.X, pos2.X) + "px"; this.TargetHtmlElement.style.left = (Math.min(pos1.X, pos2.X) >> _factor) + "px";
this.TargetHtmlElement.style.top = Math.min(pos1.Y, pos2.Y) + "px"; this.TargetHtmlElement.style.top = (Math.min(pos1.Y, pos2.Y) >> _factor) + "px";
} }
else else
{ {
...@@ -2755,8 +2757,8 @@ function CDrawingDocument(drawingObjects) ...@@ -2755,8 +2757,8 @@ function CDrawingDocument(drawingObjects)
} }
else else
{ {
this.TargetHtmlElement.style.width = _newW + "px"; this.TargetHtmlElement.style.width = (_newW >> _factor) + "px";
this.TargetHtmlElement.style.height = _newH + "px"; this.TargetHtmlElement.style.height = (_newH >> _factor) + "px";
this.TargetHtmlElement.width = _newW; this.TargetHtmlElement.width = _newW;
this.TargetHtmlElement.height = _newH; this.TargetHtmlElement.height = _newH;
...@@ -2775,8 +2777,8 @@ function CDrawingDocument(drawingObjects) ...@@ -2775,8 +2777,8 @@ function CDrawingDocument(drawingObjects)
var pos = { X : _offX + dKoef * x, Y : _offY + dKoef * y }; var pos = { X : _offX + dKoef * x, Y : _offY + dKoef * y };
this.TargetHtmlElement.style.left = pos.X + "px"; this.TargetHtmlElement.style.left = (pos.X >> _factor) + "px";
this.TargetHtmlElement.style.top = pos.Y + "px"; this.TargetHtmlElement.style.top = (pos.Y >> _factor) + "px";
} }
} }
......
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