Commit 042a6b48 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

fixed: Bug 25594 - Не происходит скроллинг страницы при изменении диапазона данных диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57433 954022d7-b5bf-4e40-9824-e11837661b57
parent da88207d
......@@ -7600,7 +7600,7 @@
// Возвращаемый результат
if (!targetInfo)
return null;
var indexFormulaRange = targetInfo.indexFormulaRange, d, newFormulaRange = null;
var indexFormulaRange = targetInfo.indexFormulaRange, d = {deltaY:0,deltaX:0}, newFormulaRange = null;
// Пересчитываем координаты
x *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIX() );
y *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIY() );
......@@ -7645,19 +7645,16 @@
}
if (rowByY < this.startCellMoveResizeRange2.r1) {
if (this.visibleRange.r2 > ar.r2)
ar.r2 = this.startCellMoveResizeRange2.r2;
ar.r2 = this.startCellMoveResizeRange2.r2;
ar.r1 = rowByY;
} else if (rowByY > this.startCellMoveResizeRange2.r1) {
if (this.visibleRange.r1 < ar.r1)
ar.r1 = this.startCellMoveResizeRange2.r1;
if (this.visibleRange.r2 > ar.r2)
ar.r2 = rowByY;
ar.r1 = this.startCellMoveResizeRange2.r1;
ar.r2 = rowByY;
} else {
ar.r1 = this.startCellMoveResizeRange2.r1;
ar.r2 = this.startCellMoveResizeRange2.r1;
}
} else {
this.startCellMoveResizeRange.normalize();
var colDelta = this.startCellMoveResizeRange.type != c_oAscSelectionType.RangeRow && this.startCellMoveResizeRange.type != c_oAscSelectionType.RangeMax ? colByX - this.startCellMoveResizeRange2.c1 : 0;
......@@ -7677,13 +7674,31 @@
}
ar.r2 = this.startCellMoveResizeRange.r2 + rowDelta;
d = {
deltaX : ar.c1 <= this.visibleRange.c1 ? ar.c1 - this.visibleRange.c1 :
ar.c2 >= this.visibleRange.c2 ? ar.c2 - this.visibleRange.c2 : 0,
deltaY : ar.r1 <= this.visibleRange.r1 ? ar.r1 - this.visibleRange.r1 :
ar.r2 >= this.visibleRange.r2 ? ar.r2 - this.visibleRange.r2 : 0};
}
if (y <= this.cellsTop + this.height_2px ){
d.deltaY = -1;
}else if ( y >= this.drawingCtx.getHeight() - this.height_2px){
d.deltaY = 1;
}
if (x <= this.cellsLeft + this.width_2px ){
d.deltaX = -1;
}else if ( x >= this.drawingCtx.getWidth() - this.width_2px){
d.deltaX = 1;
}
if (this.startCellMoveResizeRange.type === c_oAscSelectionType.RangeRow){
d.deltaX = 0;
}
else if (this.startCellMoveResizeRange.type === c_oAscSelectionType.RangeCol){
d.deltaY = 0;
}
else if (this.startCellMoveResizeRange.type === c_oAscSelectionType.RangeMax) {
d.deltaX = 0;
d.deltaY = 0;
}
if (0 == targetInfo.targetArr) {
var _p = this.arrActiveFormulaRanges[indexFormulaRange].cursorePos,
_l = this.arrActiveFormulaRanges[indexFormulaRange].formulaRangeLength;
......
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