Commit 2b38695d authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

fix bug #26997

Поправил проблему с выделением при выборе диапазона.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60362 954022d7-b5bf-4e40-9824-e11837661b57
parent 898c05d7
......@@ -6756,15 +6756,14 @@
};
WorksheetView.prototype.changeSelectionStartPoint = function (x, y, isCoord, isSelectMode) {
var ar = (this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1]: this.activeRange;
var sc = ar.startCol, sr = ar.startRow, ret = {};
var ar = ((this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1] : this.activeRange).clone();
var ret = {};
var isChangeSelectionShape = false;
this.cleanSelection();
var commentList = this.cellCommentator.getCommentsXY(x, y);
if ( !commentList.length ) {
if (!commentList.length) {
this.model.workbook.handlers.trigger("asc_onHideComment");
this.cellCommentator.resetLastSelectedId();
}
......@@ -6773,28 +6772,29 @@
// move active range to coordinates x,y
this._moveActiveCellToXY(x, y);
isChangeSelectionShape = this._checkSelectionShape();
}
else {
} else {
// move active range to offset x,y
this._moveActiveCellToOffset(x, y);
ret = this._calcActiveRangeOffset();
}
if (!this.isCellEditMode && (sc !== ar.startCol || sr !== ar.startRow || isChangeSelectionShape)) {
if (!this.isSelectionDialogMode) {
if (this.isSelectionDialogMode) {
if (!this.activeRange.isEqual(ar)) {
// Смена диапазона
this.handlers.trigger("selectionRangeChanged", this.getSelectionRangeValue());
}
} else if (!this.isCellEditMode) {
if (isChangeSelectionShape || (!isCoord && !this.activeRange.isEqual(ar)) ||
(isCoord && (this.activeRange.startCol !== ar.startCol || this.activeRange.startRow !== ar.startRow))) {
this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false));
if (!isSelectMode) {
this.handlers.trigger("selectionChanged", this.getSelectionInfo());
this.handlers.trigger("selectionMathInfoChanged", this.getSelectionMathInfo());
}
} else {
// Смена диапазона
this.handlers.trigger("selectionRangeChanged", this.getSelectionRangeValue());
}
}
if ( !isChangeSelectionShape )
if (!isChangeSelectionShape)
this._drawSelection();
//ToDo this.drawDepCells();
......
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