Commit e1bb3076 authored by Sergey Luzyanin's avatar Sergey Luzyanin

Записываем во флаг fromGroup в свойствах шейпов для мобильной версии можно ли редактировать текст.

parent 7f1ae7e5
......@@ -364,15 +364,28 @@ function DrawingObjectsController(drawingObjects)
this.handleEventMode = HANDLE_EVENT_MODE_HANDLE;
}
function CanStartEditText(oController)
{
var oSelector = oController.selection.groupSelection ? oController.selection.groupSelection : oController;
if(oSelector.selectedObjects.length === 1 && oSelector.selectedObjects[0].getObjectType() === historyitem_type_Shape)
{
return true;
}
return false;
}
DrawingObjectsController.prototype =
{
//for mobile spreadsheet editor
startEditTextCurrentShape: function()
{
var oSelector = this.selection.groupSelection ? this.selection.groupSelection : this;
if(oSelector.selectedObjects.length === 1 && oSelector.selectedObjects[0].getObjectType() === historyitem_type_Shape)
if(!CanStartEditText(this))
{
return;
}
var oSelector = this.selection.groupSelection ? this.selection.groupSelection : this;
var oShape = oSelector.selectedObjects[0];
var oContent = oShape.getDocContent();
if(oContent)
......@@ -395,8 +408,6 @@ DrawingObjectsController.prototype =
oThis.updateSelectionState();
}, [], false, historydescription_Spreadsheet_AddNewParagraph);
}
}
},
canReceiveKeyPress: function()
......@@ -6629,7 +6640,7 @@ DrawingObjectsController.prototype =
if (isRealObject(props.shapeProps))
{
shape_props = new asc_CImgProperty();
shape_props.fromGroup = props.shapeProps.fromGroup;
shape_props.fromGroup = CanStartEditText(this);
shape_props.ShapeProperties = new asc_CShapeProperty();
shape_props.ShapeProperties.type = props.shapeProps.type;
shape_props.ShapeProperties.fill = props.shapeProps.fill;
......
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