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

Fix critical Bug 20587 - Зависание приложения при перемещении автофигуры

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50036 954022d7-b5bf-4e40-9824-e11837661b57
parent 87e69d77
......@@ -4219,8 +4219,8 @@ function DrawingObjects() {
var response = { result: true, x: 0, y: 0 };
var top = worksheet.getCellTop(0, 3) + pxToMm(1);
var left = worksheet.getCellLeft(0, 3) + pxToMm(1);
var top = worksheet.getCellTop(0, 3);
var left = worksheet.getCellLeft(0, 3);
// выход за границу слева или сверху
if ( y < 0 ) {
......@@ -4233,19 +4233,22 @@ function DrawingObjects() {
}
// выход за границу справа
var foundCol = worksheet._findColUnderCursor(mmToPt(x + w), true);
while ( foundCol == null ) {
worksheet.expandColsOnScroll(true);
worksheet._trigger("reinitializeScrollX");
foundCol = worksheet._findColUnderCursor(mmToPt(x + w), true);
if ( x + w > left ) {
var foundCol = worksheet._findColUnderCursor(mmToPt(x + w), true);
while ( foundCol == null ) {
worksheet.expandColsOnScroll(true);
worksheet._trigger("reinitializeScrollX");
foundCol = worksheet._findColUnderCursor(mmToPt(x + w), true);
}
}
// выход за границу снизу
var foundRow = worksheet._findRowUnderCursor(mmToPt(y + h), true);
while ( foundRow == null ) {
worksheet.expandRowsOnScroll(true);
worksheet._trigger("reinitializeScrollY");
foundRow = worksheet._findRowUnderCursor(mmToPt(y + h), true);
if ( y + h > top ) {
var foundRow = worksheet._findRowUnderCursor(mmToPt(y + h), true);
while ( foundRow == null ) {
worksheet.expandRowsOnScroll(true);
worksheet._trigger("reinitializeScrollY");
foundRow = worksheet._findRowUnderCursor(mmToPt(y + h), true);
}
}
return response;
......
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