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

Сами запретим заходить в строку формул, когда выделен shape

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51552 954022d7-b5bf-4e40-9824-e11837661b57
parent c9bdd82f
...@@ -432,14 +432,18 @@ ...@@ -432,14 +432,18 @@
this.lastSendInfoRange = ar.clone(true); this.lastSendInfoRange = ar.clone(true);
this.lastSendInfoRange.startCol = ar.startCol; this.lastSendInfoRange.startCol = ar.startCol;
this.lastSendInfoRange.startRow = ar.startRow; this.lastSendInfoRange.startRow = ar.startRow;
this.lastSendInfoRange.isSelectOnShape = ws.isSelectOnShape; this.lastSendInfoRange.isSelectOnShape = ws.getSelectionShape();
if (null === info) { if (null === info) {
info = ws.getSelectionInfo(); info = ws.getSelectionInfo();
} }
// При редактировании ячейки не нужно пересылать изменения // При редактировании ячейки не нужно пересылать изменения
if (false === ws.getCellEditMode()) { if (false === ws.getCellEditMode()) {
this.input.prop("disabled", false); // Сами запретим заходить в строку формул, когда выделен shape
if (this.lastSendInfoRange.isSelectOnShape)
this.input.prop("disabled", true);
else
this.input.prop("disabled", false);
this.input.val(info.text); this.input.val(info.text);
} }
this.handlers.trigger("asc_onSelectionChanged", info); this.handlers.trigger("asc_onSelectionChanged", info);
...@@ -515,7 +519,8 @@ ...@@ -515,7 +519,8 @@
this._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false)); this._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
// Проверим, нужно ли отсылать информацию о ячейке // Проверим, нужно ли отсылать информацию о ячейке
var ar = ws.activeRange; var ar = ws.activeRange;
if (!this._isEqualRange(ar, ws.isSelectOnShape)) { var isSelectOnShape = ws.getSelectionShape();
if (!this._isEqualRange(ar, isSelectOnShape)) {
this._onWSSelectionChanged(ws.getSelectionInfo()); this._onWSSelectionChanged(ws.getSelectionInfo());
} }
...@@ -524,7 +529,7 @@ ...@@ -524,7 +529,7 @@
if ("hyperlink" === ct.target) { if ("hyperlink" === ct.target) {
// Проверим замерженность // Проверим замерженность
var isHyperlinkClick = false; var isHyperlinkClick = false;
if ( (ar.c1 === ar.c2 && ar.r1 === ar.r2) || ws.isSelectOnShape ) if ( (ar.c1 === ar.c2 && ar.r1 === ar.r2) || isSelectOnShape )
isHyperlinkClick = true; isHyperlinkClick = true;
else { else {
var mergedRange = ws.model.getMergedByCell(ar.r1, ar.c1); var mergedRange = ws.model.getMergedByCell(ar.r1, ar.c1);
...@@ -532,7 +537,7 @@ ...@@ -532,7 +537,7 @@
isHyperlinkClick = true; isHyperlinkClick = true;
} }
if (isHyperlinkClick) { if (isHyperlinkClick) {
if (false === ct.hyperlink.hyperlinkModel.getVisited() && !ws.isSelectOnShape) { if (false === ct.hyperlink.hyperlinkModel.getVisited() && !isSelectOnShape) {
ct.hyperlink.hyperlinkModel.setVisited(true); ct.hyperlink.hyperlinkModel.setVisited(true);
if (ct.hyperlink.hyperlinkModel.Ref) if (ct.hyperlink.hyperlinkModel.Ref)
ws.changeWorksheet("updateRange", {range: ct.hyperlink.hyperlinkModel.Ref.getBBox0(), isLockDraw: false, canChangeColWidth: false}); ws.changeWorksheet("updateRange", {range: ct.hyperlink.hyperlinkModel.Ref.getBBox0(), isLockDraw: false, canChangeColWidth: false});
......
...@@ -5853,6 +5853,9 @@ ...@@ -5853,6 +5853,9 @@
this._trigger("selectionChanged", this.getSelectionInfo()); this._trigger("selectionChanged", this.getSelectionInfo());
}, },
getSelectionShape: function () {
return this.isSelectOnShape;
},
setSelectionShape: function (isSelectOnShape) { setSelectionShape: function (isSelectOnShape) {
this.isSelectOnShape = isSelectOnShape; this.isSelectOnShape = isSelectOnShape;
// отправляем евент для получения свойств картинки, шейпа или группы // отправляем евент для получения свойств картинки, шейпа или группы
......
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