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 @@ ...@@ -6756,15 +6756,14 @@
}; };
WorksheetView.prototype.changeSelectionStartPoint = function (x, y, isCoord, isSelectMode) { WorksheetView.prototype.changeSelectionStartPoint = function (x, y, isCoord, isSelectMode) {
var ar = ((this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1] : this.activeRange).clone();
var ar = (this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1]: this.activeRange; var ret = {};
var sc = ar.startCol, sr = ar.startRow, ret = {};
var isChangeSelectionShape = false; var isChangeSelectionShape = false;
this.cleanSelection(); this.cleanSelection();
var commentList = this.cellCommentator.getCommentsXY(x, y); var commentList = this.cellCommentator.getCommentsXY(x, y);
if ( !commentList.length ) { if (!commentList.length) {
this.model.workbook.handlers.trigger("asc_onHideComment"); this.model.workbook.handlers.trigger("asc_onHideComment");
this.cellCommentator.resetLastSelectedId(); this.cellCommentator.resetLastSelectedId();
} }
...@@ -6773,30 +6772,31 @@ ...@@ -6773,30 +6772,31 @@
// move active range to coordinates x,y // move active range to coordinates x,y
this._moveActiveCellToXY(x, y); this._moveActiveCellToXY(x, y);
isChangeSelectionShape = this._checkSelectionShape(); isChangeSelectionShape = this._checkSelectionShape();
} } else {
else {
// move active range to offset x,y // move active range to offset x,y
this._moveActiveCellToOffset(x, y); this._moveActiveCellToOffset(x, y);
ret = this._calcActiveRangeOffset(); ret = this._calcActiveRangeOffset();
} }
if (this.isSelectionDialogMode) {
if (!this.isCellEditMode && (sc !== ar.startCol || sr !== ar.startRow || isChangeSelectionShape)) { if (!this.activeRange.isEqual(ar)) {
if (!this.isSelectionDialogMode) { // Смена диапазона
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)); this.handlers.trigger("selectionNameChanged", this.getSelectionName(/*bRangeText*/false));
if (!isSelectMode) { if (!isSelectMode) {
this.handlers.trigger("selectionChanged", this.getSelectionInfo()); this.handlers.trigger("selectionChanged", this.getSelectionInfo());
this.handlers.trigger("selectionMathInfoChanged", this.getSelectionMathInfo()); this.handlers.trigger("selectionMathInfoChanged", this.getSelectionMathInfo());
} }
} else {
// Смена диапазона
this.handlers.trigger("selectionRangeChanged", this.getSelectionRangeValue());
} }
} }
if ( !isChangeSelectionShape ) if (!isChangeSelectionShape)
this._drawSelection(); this._drawSelection();
//ToDo this.drawDepCells(); //ToDo this.drawDepCells();
return ret; return ret;
......
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