Commit 77d87331 authored by Sergey Luzyanin's avatar Sergey Luzyanin

getNearestPos

parent 5d9245c4
......@@ -1498,6 +1498,22 @@ DrawingObjectsController.prototype =
{
},
getNearestPos: function(x, y){
var oTragetDocContent = this.getTargetDocContent(false, false);
if(oTragetDocContent){
var tx = x, ty = y;
var oTransform = oTragetDocContent.Get_ParentTextTransform();
if(oTransform){
var oInvertTransform = AscCommon.global_MatrixTransformer.Invert(oTransform);
tx = oInvertTransform.TransformPointX(x, y);
ty = oInvertTransform.TransformPointY(x, y);
return oTragetDocContent.Get_NearestPos(0, tx, ty, false);
}
}
return null;
},
getTargetDocContent: function(bCheckChartTitle, bOrTable)
{
var text_object = getTargetTextObject(this);
......
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