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

Bug 27589 - Не открывается контекстное меню для заголовка диаграммы, если...

Bug 27589 - Не открывается контекстное меню для заголовка диаграммы, если внутри него находится только курсор

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60462 954022d7-b5bf-4e40-9824-e11837661b57
parent b9ca3bec
...@@ -4397,6 +4397,22 @@ DrawingObjectsController.prototype = ...@@ -4397,6 +4397,22 @@ DrawingObjectsController.prototype =
}, },
checkNeedResetChartSelection: function(e, x, y, pageIndex, bTextFlag)
{
var oTitle, oCursorInfo, oTargetTextObject = getTargetTextObject(this);
if(oTargetTextObject instanceof CTitle)
{
oTitle = oTargetTextObject;
}
if(!oTitle)
return true;
this.handleEventMode = HANDLE_EVENT_MODE_CURSOR;
oCursorInfo = this.curState.onMouseDown(e, x, y, pageIndex, bTextFlag);
this.handleEventMode = HANDLE_EVENT_MODE_HANDLE;
return !(oTitle === oCursorInfo.title);
},
checkChartTextSelection: function(bNoRedraw) checkChartTextSelection: function(bNoRedraw)
{ {
if(this.bNoCheckChartTextSelection === true) if(this.bNoCheckChartTextSelection === true)
......
...@@ -344,7 +344,7 @@ function handleChart(drawing, drawingObjectsController, e, x, y, group, pageInde ...@@ -344,7 +344,7 @@ function handleChart(drawing, drawingObjectsController, e, x, y, group, pageInde
content.Update_CursorType(tx, ty, pageIndex); content.Update_CursorType(tx, ty, pageIndex);
} }
} }
return {objectId: drawing.Get_Id(), cursorType: "text"}; return {objectId: drawing.Get_Id(), cursorType: "text", title: title};
} }
} }
} }
...@@ -443,7 +443,7 @@ function handleInlineChart(drawing, drawingObjectsController, e, x, y, pageIndex ...@@ -443,7 +443,7 @@ function handleInlineChart(drawing, drawingObjectsController, e, x, y, pageIndex
content.Update_CursorType(tx, ty, pageIndex); content.Update_CursorType(tx, ty, pageIndex);
} }
} }
return {objectId: drawing.Get_Id(), cursorType: "text"}; return {objectId: drawing.Get_Id(), cursorType: "text", title: title};
} }
} }
} }
......
...@@ -367,7 +367,9 @@ CChartSpace.prototype = ...@@ -367,7 +367,9 @@ CChartSpace.prototype =
dataLbl: this.selection.dataLbl, dataLbl: this.selection.dataLbl,
textSelection: this.selection.textSelection, textSelection: this.selection.textSelection,
plotArea: this.selection.plotArea, plotArea: this.selection.plotArea,
contentSelection: content_selection contentSelection: content_selection,
recalcTitle: this.recalcInfo.recalcTitle,
bRecalculatedTitle: this.recalcInfo.bRecalculatedTitle
} }
}, },
...@@ -382,6 +384,8 @@ CChartSpace.prototype = ...@@ -382,6 +384,8 @@ CChartSpace.prototype =
this.selection.dataLbl = state.dataLbl; this.selection.dataLbl = state.dataLbl;
this.selection.textSelection = state.textSelection; this.selection.textSelection = state.textSelection;
this.selection.plotArea = state.plotArea; this.selection.plotArea = state.plotArea;
this.recalcInfo.recalcTitle = state.recalcTitle;
this.recalcInfo.bRecalculatedTitle = state.bRecalculatedTitle;
if(state.contentSelection) if(state.contentSelection)
{ {
if(this.selection.textSelection) if(this.selection.textSelection)
......
...@@ -198,7 +198,10 @@ NullState.prototype = ...@@ -198,7 +198,10 @@ NullState.prototype =
{} {}
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE) if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{ {
this.drawingObjects.checkChartTextSelection(); if(this.drawingObjects.checkNeedResetChartSelection(e, x, y, pageIndex, bTextFlag))
{
this.drawingObjects.checkChartTextSelection();
}
this.drawingObjects.resetInternalSelection(true); this.drawingObjects.resetInternalSelection(true);
} }
if(!b_no_handle_selected) if(!b_no_handle_selected)
......
...@@ -199,7 +199,10 @@ NullState.prototype = ...@@ -199,7 +199,10 @@ NullState.prototype =
{} {}
if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE) if(this.drawingObjects.handleEventMode === HANDLE_EVENT_MODE_HANDLE)
{ {
this.drawingObjects.checkChartTextSelection(); if(this.drawingObjects.checkNeedResetChartSelection(e, x, y, pageIndex, bTextFlag))
{
this.drawingObjects.checkChartTextSelection();
}
this.drawingObjects.resetInternalSelection(); this.drawingObjects.resetInternalSelection();
if(e.ClickCount < 2) if(e.ClickCount < 2)
{ {
......
...@@ -2440,6 +2440,7 @@ CGraphicObjects.prototype = ...@@ -2440,6 +2440,7 @@ CGraphicObjects.prototype =
}, },
checkChartTextSelection: DrawingObjectsController.prototype.checkChartTextSelection, checkChartTextSelection: DrawingObjectsController.prototype.checkChartTextSelection,
checkNeedResetChartSelection: DrawingObjectsController.prototype.checkNeedResetChartSelection,
addNewParagraph: DrawingObjectsController.prototype.addNewParagraph, addNewParagraph: DrawingObjectsController.prototype.addNewParagraph,
......
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