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

Для построения polyline

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51299 954022d7-b5bf-4e40-9824-e11837661b57
parent 6b62daf1
...@@ -52,8 +52,7 @@ ...@@ -52,8 +52,7 @@
this.targetInfo = undefined; this.targetInfo = undefined;
this.isResizeMode = false; this.isResizeMode = false;
this.isResizeModeMove = false; this.isResizeModeMove = false;
// Для обработки событий автофигур
this.isGraphicObjectMode = false;
// Режим автозаполнения // Режим автозаполнения
this.isFillHandleMode = false; this.isFillHandleMode = false;
this.isMoveRangeMode = false; this.isMoveRangeMode = false;
...@@ -992,10 +991,9 @@ ...@@ -992,10 +991,9 @@
this.hsbApi.evt_mouseup(event); this.hsbApi.evt_mouseup(event);
// Shapes // Shapes
var coord = this._getCoordinates(event); var coord = this._getCoordinates(event);
if ( this.isGraphicObjectMode ) { if ( asc["editor"].isStartAddShape ) {
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;
return true; return true;
} }
...@@ -1106,15 +1104,10 @@ ...@@ -1106,15 +1104,10 @@
} }
// Shapes // Shapes
this.isGraphicObjectMode = false;
var graphicsInfo = t.handlers.trigger("getGraphicsInfo", coord.x, coord.y); var graphicsInfo = t.handlers.trigger("getGraphicsInfo", coord.x, coord.y);
if ( asc["editor"].isStartAddShape || (graphicsInfo && graphicsInfo.isGraphicObject) ) { if ( asc["editor"].isStartAddShape || (graphicsInfo && graphicsInfo.isGraphicObject) ) {
this.isGraphicObjectMode = true;
} asc["editor"].isStartAddShape = true;
if ( this.isGraphicObjectMode ) {
var currTime = getCurrentTime(); var currTime = getCurrentTime();
if ( currTime - this.lastMouseDownTime < this.dbClickInterval ) if ( currTime - this.lastMouseDownTime < this.dbClickInterval )
this.mouseClickCount = 2; this.mouseClickCount = 2;
...@@ -1137,7 +1130,6 @@ ...@@ -1137,7 +1130,6 @@
} }
else if ( t.targetInfo && t.targetInfo.target != "moveResizeRange" ) { else if ( t.targetInfo && t.targetInfo.target != "moveResizeRange" ) {
t.handlers.trigger("resetSelectedGraphicObjects"); t.handlers.trigger("resetSelectedGraphicObjects");
this.isGraphicObjectMode = false;
} }
if (event.originalEvent && 2 === event.originalEvent.detail) { if (event.originalEvent && 2 === event.originalEvent.detail) {
...@@ -1264,11 +1256,10 @@ ...@@ -1264,11 +1256,10 @@
// Shapes // Shapes
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 ( asc["editor"].isStartAddShape ) {
event.ClickCount = this.mouseClickCount; 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;
return true; return true;
} }
...@@ -1311,7 +1302,7 @@ ...@@ -1311,7 +1302,7 @@
t.hasCursor = true; t.hasCursor = true;
// Shapes // Shapes
if ( this.isGraphicObjectMode ) { if ( asc["editor"].isStartAddShape ) {
t.handlers.trigger("graphicObjectMouseMove", event, coord.x, coord.y); t.handlers.trigger("graphicObjectMouseMove", event, coord.x, coord.y);
t.handlers.trigger("updateWorksheet", t.element[0], coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;}); t.handlers.trigger("updateWorksheet", t.element[0], coord.x, coord.y, event.ctrlKey, function(info){t.targetInfo = info;});
return; return;
......
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