Commit 546d4280 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

- Доработан dbClick для граф.объектов

- Выделение текста в шейпе при dbClick
- Построение polyLine

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51141 954022d7-b5bf-4e40-9824-e11837661b57
parent 1408fcd7
......@@ -3986,8 +3986,8 @@ function SplineBezierState(drawingObjectsController, drawingObjects)
var spline = new Spline(this.drawingObjects);
this.drawingObjectsController.addTrackObject(spline);
spline.addPathCommand(new SplineCommandMoveTo(x, y));
this.drawingObjectsController.resetSelection();
this.drawingObjectsController.changeCurrentState(new SplineBezierState33(this.drawingObjectsController, this.drawingObjects, x, y, spline));
this.drawingObjectsController.resetSelection();
this.drawingObjects.OnUpdateOverlay();
};
......
......@@ -64,6 +64,11 @@
// Режим формулы
this.isFormulaEditMode = false;
this.endWasPressed = false;
// DblClick для граф.объектов
this.dbClickInterval = 500;
this.mouseClickCount = 0;
this.lastMouseDownTime = getCurrentTime();
// Был ли DblClick обработан в onMouseDown эвенте
this.isDblClickInMouseDown = false;
......@@ -1106,12 +1111,21 @@
if ( asc["editor"].isStartAddShape || (graphicsInfo && graphicsInfo.isGraphicObject) ) {
this.isGraphicObjectMode = true;
asc["editor"].isStartAddShape = false;
}
if ( this.isGraphicObjectMode ) {
event.ClickCount = 1;
var currTime = getCurrentTime();
if ( currTime - this.lastMouseDownTime < this.dbClickInterval )
this.mouseClickCount = 2;
else
this.mouseClickCount = 1;
event.ClickCount = this.mouseClickCount;
this.lastMouseDownTime = currTime;
t.handlers.trigger("graphicObjectMouseDown", event, coord.x, coord.y);
if ( t.isCellEditMode )
t.handlers.trigger("stopCellEditing");
......@@ -1251,6 +1265,7 @@
var coord = this._getCoordinates(event);
this.handlers.trigger("graphicObjectMouseUpEx", event, coord.x, coord.y);
if ( this.isGraphicObjectMode ) {
event.ClickCount = this.mouseClickCount;
this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y);
this._changeSelectionDone(event);
this.isGraphicObjectMode = false;
......@@ -1377,14 +1392,6 @@
var t = this;
var coord = t._getCoordinates(event);
// shapes
var graphicsInfo = t.handlers.trigger("getGraphicsInfo", coord.x, coord.y);
if ( graphicsInfo && graphicsInfo.isGraphicObject ) {
event.ClickCount = 2;
t.handlers.trigger("graphicObjectMouseDown", event, coord.x, coord.y);
return;
}
if (this.handlers.trigger("isGlobalLockEditCell"))
return false;
......
......@@ -5822,10 +5822,8 @@
this.objectRender.OnUpdateOverlay();
}
else {
if ( this.objectRender.controller.curState.id != STATES_ID_BEGIN_TRACK_NEW_SHAPE ) {
if ( !asc["editor"].isStartAddShape ) {
this.objectRender.unselectDrawingObjects();
asc["editor"].isStartAddShape = false;
if ( this.isUpdateSelection )
this._trigger("selectionChanged", this.getSelectionInfo());
}
......
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