Commit 94ef64f8 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Fix Bug 19315 - Некорректная отрисовка рамки выделения автофигуры "произвольная линия"

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51365 954022d7-b5bf-4e40-9824-e11837661b57
parent 0dd4eb4b
......@@ -46,6 +46,25 @@ var STATES_ID_CHART_TEXT_ADD = 0x36;
var STATES_ID_TEXT_ADD_IN_GROUP = 0x37;
var STATES_ID_EXPECT_DOUBLE_CLICK = 0x38;
var ADD_SHAPE_ID_MAP = {};
ADD_SHAPE_ID_MAP[STATES_ID_START_TRACK_NEW_SHAPE] = true;
ADD_SHAPE_ID_MAP[STATES_ID_BEGIN_TRACK_NEW_SHAPE] = true;
ADD_SHAPE_ID_MAP[STATES_ID_TRACK_NEW_SHAPE] = true;
ADD_SHAPE_ID_MAP[STATES_ID_SPLINE_BEZIER] = true;
ADD_SHAPE_ID_MAP[STATES_ID_SPLINE_BEZIER33] = true;
ADD_SHAPE_ID_MAP[STATES_ID_SPLINE_BEZIER2] = true;
ADD_SHAPE_ID_MAP[STATES_ID_SPLINE_BEZIER3] = true;
ADD_SHAPE_ID_MAP[STATES_ID_SPLINE_BEZIER5] = true;
ADD_SHAPE_ID_MAP[STATES_ID_POLY_LINE_ADD] = true;
ADD_SHAPE_ID_MAP[STATES_ID_POLY_LINE_ADD2] = true;
ADD_SHAPE_ID_MAP[STATES_ID_ADD_PPOLY_LINE2] = true;
ADD_SHAPE_ID_MAP[STATES_ID_ADD_PPOLY_LINE22] = true;
ADD_SHAPE_ID_MAP[STATES_ID_ADD_PPOLY_LINE23] = true;
function CheckIdSatetShapeAdd(id)
{
return ADD_SHAPE_ID_MAP[id] === true;
}
var asc = window["Asc"] ? window["Asc"] : (window["Asc"] = {});
......@@ -272,6 +291,7 @@ function NullState(drawingObjectsController, drawingObjects)
this.drawingObjectsController.resetSelection();
this.drawingObjectsController.changeCurrentState(new NullState(this.drawingObjectsController, this.drawingObjects));
this.drawingObjects.OnUpdateOverlay();
asc["editor"].asc_endAddShape();
};
this.onMouseMove = function(e, x, y)
......
......@@ -2733,7 +2733,7 @@
_drawSelectionRange: function (range) {
if (asc["editor"].isStartAddShape && this.objectRender.selectedGraphicObjectsExists()) {
if (asc["editor"].isStartAddShape || this.objectRender.selectedGraphicObjectsExists()) {
if (this.isChartAreaEditMode) {
this._drawFormulaRange(this.arrActiveChartsRanges)
}
......@@ -4976,7 +4976,7 @@
if (drawingInfo)
return {cursor: drawingInfo.cursor, target: "shape", col: -1, row: -1};
if (asc["editor"].isStartAddShape)
if (asc["editor"].isStartAddShape && CheckIdSatetShapeAdd(this.objectRender.controller.curState.id))
return {cursor: kCurFillHandle, target: "shape", col: -1, row: -1};
var drawingInfo = this.objectRender.checkCursorDrawingObject(x, y);
......
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