Commit a12f2c87 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

При смещении не показываем редактор (баг http://bugzserver/show_bug.cgi?id=24272).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56927 954022d7-b5bf-4e40-9824-e11837661b57
parent 92d6b4e0
......@@ -428,23 +428,28 @@
t._moveCursor(kEndOfText);
};
CellEditor.prototype.move = function (dx, dy) {
var t = this;
var opt = t.options;
CellEditor.prototype.move = function (dx, dy, l, t, r, b) {
var opt = this.options;
t.left += dx;
t.right += dx;
t.top += dy;
t.bottom += dy;
this.left += dx;
this.right += dx;
this.top += dy;
this.bottom += dy;
opt.leftSide.forEach(function (e,i,a) {a[i] = e + dx;});
opt.rightSide.forEach(function (e,i,a) {a[i] = e + dx;});
opt.bottomSide.forEach(function (e,i,a) {a[i] = e + dy;});
// ToDo выставлять опции (т.к. при scroll редактор должен пересчитываться)
t._adjustCanvas();
t._renderText();
t._drawSelection();
if (this.left < l || this.top < t || this.left > r || this.top > b) {
// hide
this.canvasOuterStyle.display = 'none';
} else {
this.canvasOuterStyle.display = 'block';
// ToDo выставлять опции (т.к. при scroll редактор должен пересчитываться и уменьшаться размеры)
this._adjustCanvas();
this._renderText();
this._drawSelection();
}
};
CellEditor.prototype.setFocus = function (hasFocus) {
......
......@@ -5214,7 +5214,10 @@
var lastRowHeight = (scrollDown && oldVRE_isPartial) ?
ctxH - (this.rows[oldEnd].top - this.rows[vr.r1].top + this.cellsTop + diffHeight) : 0;
if (this.isCellEditMode && editor) {editor.move(0, -dy);}
if (this.isCellEditMode && editor && this.activeRange.r1 >= rFrozen) {
editor.move(0, -dy, this.cellsLeft + (this.activeRange.c1 >= cFrozen ? diffWidth : 0),
this.cellsTop + diffHeight, ctxW, ctxH);
}
vr.r1 = start;
this._updateVisibleRowsCount();
......@@ -5346,7 +5349,7 @@
var scrollRight = (dx > 0 && oldW > 0);
var x = this.cellsLeft + (scrollRight ? dx : 0);
var y = this.headersTop;
var cFrozen, rFrozen;
var cFrozen = 0, rFrozen = 0;
if (this.topLeftFrozenCell) {
rFrozen = this.topLeftFrozenCell.getRow0();
cFrozen = this.topLeftFrozenCell.getCol0();
......@@ -5360,7 +5363,10 @@
var lastColWidth = (scrollRight && oldVCE_isPartial) ?
ctxW - (this.cols[oldEnd].left - this.cols[vr.c1].left + this.cellsLeft + diffWidth) : 0;
if (this.isCellEditMode && editor) {editor.move(-dx, 0);}
if (this.isCellEditMode && editor && this.activeRange.c1 >= cFrozen) {
editor.move(-dx, 0, this.cellsLeft + diffWidth,
this.cellsTop + (this.activeRange.r1 >= rFrozen ? diffHeight : 0), ctxW, ctxH);
}
vr.c1 = start;
this._updateVisibleColsCount();
......
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