Commit 8999a308 authored by SergeyLuzyanin's avatar SergeyLuzyanin

cursorGetPos

parent a257fcdb
...@@ -2458,18 +2458,17 @@ CGraphicObjects.prototype = ...@@ -2458,18 +2458,17 @@ CGraphicObjects.prototype =
cursorGetPos: function() cursorGetPos: function()
{ {
var text_object; var oTargetDocContent = this.getTargetDocContent();
if(this.selection.textObject) if(oTargetDocContent){
{ var oPos = oTargetDocContent.Cursor_GetPos();
text_object = this.selection.textObject; var oTransform = oTargetDocContent.Get_ParentTextTransform();
} if(oTransform){
else if(this.selection.groupSelection && this.selection.groupSelection.textObject) var _x = oTransform.TransformPointX(oPos.X, oPos.Y);
{ var _y = oTransform.TransformPointY(oPos.X, oPos.Y);
text_object = this.selection.groupSelection.textObject; return {X: _x, Y: _y};
}
return oPos;
} }
if(text_object)
return text_object.cursorGetPos();
return {X: 0, Y: 0}; return {X: 0, Y: 0};
}, },
......
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