Commit ca256965 authored by Sergey Luzyanin's avatar Sergey Luzyanin Committed by Alexander.Trofimov

for mobile spreadsheet editor startEditTextCurrentShape

parent 271c8c0a
......@@ -341,6 +341,37 @@ function DrawingObjectsController(drawingObjects)
DrawingObjectsController.prototype =
{
//for mobile spreadsheet editor
startEditTextCurrentShape: function()
{
if(this.selectedObjects.length === 1 && this.selectedObjects[0].getObjectType() === historyitem_type_Shape)
{
var oShape = this.selectedObjects[0];
var oContent = oShape.getDocContent();
if(oContent)
{
this.resetInternalSelection();
this.selection.textSelection = oShape;
oContent.Cursor_MoveToEndPos(false);
this.updateSelectionState();
this.updateOverlay();
}
else
{
var oThis = this;
this.checkSelectedObjectsAndCallback(function(){
oShape.createTextBody();
var oContent = oShape.getDocContent();
oThis.resetInternalSelection();
oThis.selection.textSelection = oShape;
oContent.Cursor_MoveToEndPos(false);
oThis.updateSelectionState();
}, [], false, historydescription_Spreadsheet_AddNewParagraph);
}
}
},
canReceiveKeyPress: function()
{
return this.curState instanceof NullState;
......
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