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) ...@@ -3986,8 +3986,8 @@ function SplineBezierState(drawingObjectsController, drawingObjects)
var spline = new Spline(this.drawingObjects); var spline = new Spline(this.drawingObjects);
this.drawingObjectsController.addTrackObject(spline); this.drawingObjectsController.addTrackObject(spline);
spline.addPathCommand(new SplineCommandMoveTo(x, y)); spline.addPathCommand(new SplineCommandMoveTo(x, y));
this.drawingObjectsController.changeCurrentState(new SplineBezierState33(this.drawingObjectsController, this.drawingObjects, x, y, spline));
this.drawingObjectsController.resetSelection(); this.drawingObjectsController.resetSelection();
this.drawingObjectsController.changeCurrentState(new SplineBezierState33(this.drawingObjectsController, this.drawingObjects, x, y, spline));
this.drawingObjects.OnUpdateOverlay(); this.drawingObjects.OnUpdateOverlay();
}; };
......
...@@ -65,6 +65,11 @@ ...@@ -65,6 +65,11 @@
this.isFormulaEditMode = false; this.isFormulaEditMode = false;
this.endWasPressed = false; this.endWasPressed = false;
// DblClick для граф.объектов
this.dbClickInterval = 500;
this.mouseClickCount = 0;
this.lastMouseDownTime = getCurrentTime();
// Был ли DblClick обработан в onMouseDown эвенте // Был ли DblClick обработан в onMouseDown эвенте
this.isDblClickInMouseDown = false; this.isDblClickInMouseDown = false;
// Нужно ли обрабатывать эвент браузера dblClick // Нужно ли обрабатывать эвент браузера dblClick
...@@ -1106,12 +1111,21 @@ ...@@ -1106,12 +1111,21 @@
if ( asc["editor"].isStartAddShape || (graphicsInfo && graphicsInfo.isGraphicObject) ) { if ( asc["editor"].isStartAddShape || (graphicsInfo && graphicsInfo.isGraphicObject) ) {
this.isGraphicObjectMode = true; this.isGraphicObjectMode = true;
asc["editor"].isStartAddShape = false;
} }
if ( this.isGraphicObjectMode ) { 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); t.handlers.trigger("graphicObjectMouseDown", event, coord.x, coord.y);
if ( t.isCellEditMode ) if ( t.isCellEditMode )
t.handlers.trigger("stopCellEditing"); t.handlers.trigger("stopCellEditing");
...@@ -1251,6 +1265,7 @@ ...@@ -1251,6 +1265,7 @@
var coord = this._getCoordinates(event); var coord = this._getCoordinates(event);
this.handlers.trigger("graphicObjectMouseUpEx", event, coord.x, coord.y); this.handlers.trigger("graphicObjectMouseUpEx", event, coord.x, coord.y);
if ( this.isGraphicObjectMode ) { if ( this.isGraphicObjectMode ) {
event.ClickCount = this.mouseClickCount;
this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y); this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y);
this._changeSelectionDone(event); this._changeSelectionDone(event);
this.isGraphicObjectMode = false; this.isGraphicObjectMode = false;
...@@ -1377,14 +1392,6 @@ ...@@ -1377,14 +1392,6 @@
var t = this; var t = this;
var coord = t._getCoordinates(event); 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")) if (this.handlers.trigger("isGlobalLockEditCell"))
return false; return false;
......
...@@ -5822,10 +5822,8 @@ ...@@ -5822,10 +5822,8 @@
this.objectRender.OnUpdateOverlay(); this.objectRender.OnUpdateOverlay();
} }
else { else {
if ( this.objectRender.controller.curState.id != STATES_ID_BEGIN_TRACK_NEW_SHAPE ) { if ( !asc["editor"].isStartAddShape ) {
this.objectRender.unselectDrawingObjects(); this.objectRender.unselectDrawingObjects();
asc["editor"].isStartAddShape = false;
if ( this.isUpdateSelection ) if ( this.isUpdateSelection )
this._trigger("selectionChanged", this.getSelectionInfo()); 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