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

Fix Bug 22917 - Зависание приложения при вводе текста в автофигуру

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54162 954022d7-b5bf-4e40-9824-e11837661b57
parent 4d36ba4b
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
this.targetInfo = undefined; this.targetInfo = undefined;
this.isResizeMode = false; this.isResizeMode = false;
this.isResizeModeMove = false; this.isResizeModeMove = false;
// Выставляем при клике в объект(_onMouseDown)
this.isGraphicMode = false;
// Режим автозаполнения // Режим автозаполнения
this.isFillHandleMode = false; this.isFillHandleMode = false;
...@@ -972,6 +974,9 @@ ...@@ -972,6 +974,9 @@
/** @param event {jQuery.Event} */ /** @param event {jQuery.Event} */
asc_CEventsController.prototype._onWindowMouseMove = function (event) { asc_CEventsController.prototype._onWindowMouseMove = function (event) {
var t = this;
var coord = t._getCoordinates(event);
if (this.isSelectMode && !this.hasCursor) {this._changeSelection2(event);} if (this.isSelectMode && !this.hasCursor) {this._changeSelection2(event);}
if (this.isResizeMode && !this.hasCursor) { if (this.isResizeMode && !this.hasCursor) {
this.isResizeModeMove = true; this.isResizeModeMove = true;
...@@ -982,6 +987,10 @@ ...@@ -982,6 +987,10 @@
else if( this.vsbApiLockMouse ) else if( this.vsbApiLockMouse )
this.vsbApi.mouseDown ? this.vsbApi.evt_mousemove.call(this.vsbApi,event) : false; this.vsbApi.mouseDown ? this.vsbApi.evt_mousemove.call(this.vsbApi,event) : false;
event.isLocked = t.isLocked;
if (asc["editor"].isStartAddShape && t.isGraphicMode)
t.handlers.trigger("graphicObjectMouseMove", event, coord.x, coord.y);
return true; return true;
}; };
...@@ -996,9 +1005,10 @@ ...@@ -996,9 +1005,10 @@
var coord = this._getCoordinates(event); var coord = this._getCoordinates(event);
// Отправляем событие только вне канвы // Отправляем событие только вне канвы
if ( (( coord.x < 0 ) || (coord.y < 0) || (coord.x > this.element.width) || (coord.y > this.element.height)) && asc["editor"].isStartAddShape ) { if ( this.isGraphicMode && asc["editor"].isStartAddShape ) {
this.isLocked = false; this.isLocked = false;
event.isLocked = false; event.isLocked = false;
this.isGraphicMode = false;
event.ClickCount = this.clickCounter.clickCount; event.ClickCount = this.clickCounter.clickCount;
this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y); this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y);
this._changeSelectionDone(event); this._changeSelectionDone(event);
...@@ -1125,6 +1135,9 @@ ...@@ -1125,6 +1135,9 @@
// При выборе диапазона не нужно выделять автофигуру // При выборе диапазона не нужно выделять автофигуру
if (t.isSelectionDialogMode) if (t.isSelectionDialogMode)
return; return;
if ( t.isCellEditMode )
t.handlers.trigger("stopCellEditing");
//for Mac OS //for Mac OS
if (event.metaKey) if (event.metaKey)
event.ctrlKey = true; event.ctrlKey = true;
...@@ -1137,9 +1150,7 @@ ...@@ -1137,9 +1150,7 @@
asc["editor"].isStartAddShape = true; asc["editor"].isStartAddShape = true;
t.handlers.trigger("graphicObjectMouseDown", event, coord.x, coord.y); t.handlers.trigger("graphicObjectMouseDown", event, coord.x, coord.y);
t.isGraphicMode = true;
if ( t.isCellEditMode )
t.handlers.trigger("stopCellEditing");
if (asc["editor"].isStartAddShape) { if (asc["editor"].isStartAddShape) {
// SelectionChanged // SelectionChanged
...@@ -1289,6 +1300,7 @@ ...@@ -1289,6 +1300,7 @@
event.ClickCount = this.clickCounter.clickCount; event.ClickCount = this.clickCounter.clickCount;
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.isGraphicMode = false;
return true; return true;
} }
......
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