Commit a48c6b75 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Правки для Shift (при нажатии ЛКМ можно продолжать выделять) + только когда...

Правки для Shift (при нажатии ЛКМ можно продолжать выделять) + только когда уже было выделение при отпускании Shift обновляем информацию о select

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50258 954022d7-b5bf-4e40-9824-e11837661b57
parent be7e0c9b
......@@ -1147,7 +1147,8 @@
t.hasFocus = true;
if (!t.isCellEditMode) {
if (event.shiftKey) {
t._changeSelection(event, /*isSelectMode*/false);
t.isSelectMode = true;
t._changeSelection(event, /*isSelectMode*/true);
return;
}
if (t.targetInfo){
......@@ -1185,7 +1186,8 @@
if (!t.handlers.trigger("stopCellEditing")) {return;}
} else {
if (event.shiftKey) {
t._changeSelection(event, /*isSelectMode*/false);
t.isSelectMode = true;
t._changeSelection(event, /*isSelectMode*/true);
return;
} else {
if (t.isFormulaEditMode) {
......
......@@ -61,6 +61,7 @@
this.Api = Api;
this.collaborativeEditing = collaborativeEditing;
this.lastSendInfoRange = null;
this.canUpdateAfterShiftUp = false; // Нужно ли обновлять информацию после отпускания Shift
//----- declaration -----
this.canvas = undefined;
......@@ -488,6 +489,10 @@
var d = isStartPoint ?
ws.changeSelectionStartPoint(dc, dr, isCoord, isSelectMode):
ws.changeSelectionEndPoint(dc, dr, isCoord, isSelectMode);
if (!isCoord && !isStartPoint && !isSelectMode) {
// Выделение с зажатым shift
this.canUpdateAfterShiftUp = true;
}
if ($.isFunction(callback)) {callback(d);}
},
......@@ -695,8 +700,11 @@
},
_onUpdateSelectionName: function () {
if (this.canUpdateAfterShiftUp) {
this.canUpdateAfterShiftUp = false;
var ws = this.getWorksheet();
this._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
}
},
// Shapes
......
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