Commit f0b215b5 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

- Не очищался предыдущий селект комментария при переходах из левой панели

- Не очищался селект комментария при переходе на ячейку

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51699 954022d7-b5bf-4e40-9824-e11837661b57
parent cb2daa2b
...@@ -1024,9 +1024,21 @@ function asc_CCellCommentator(currentSheet) { ...@@ -1024,9 +1024,21 @@ function asc_CCellCommentator(currentSheet) {
} }
_this.resetLastSelectedId = function() { _this.resetLastSelectedId = function() {
_this.cleanLastSelection();
_this.lastSelectedId = null; _this.lastSelectedId = null;
} }
_this.cleanLastSelection = function() {
if ( _this.lastSelectedId ) {
var lastComment = _this.asc_findComment(_this.lastSelectedId);
if ( lastComment ) {
var lastMetrics = _this.getCellMetrics(lastComment.nCol, lastComment.nRow);
if ( lastMetrics.result )
_this.overlayCtx.clearRect(_this.pxToPt(lastMetrics.left), _this.pxToPt(lastMetrics.top), _this.pxToPt(lastMetrics.width), _this.pxToPt(lastMetrics.height));
}
}
}
_this.calcCommentsCoords = function(bSave) { _this.calcCommentsCoords = function(bSave) {
_this.aCommentCoords = []; _this.aCommentCoords = [];
...@@ -1309,10 +1321,12 @@ asc_CCellCommentator.prototype = { ...@@ -1309,10 +1321,12 @@ asc_CCellCommentator.prototype = {
asc_selectComment: function(id, bMove) { asc_selectComment: function(id, bMove) {
var _this = this; var _this = this;
_this.lastSelectedId = null;
var comment = _this.asc_findComment(id); var comment = _this.asc_findComment(id);
if (comment && !comment.asc_getDocumentFlag() && !comment.asc_getSolved()) { if (comment && !comment.asc_getDocumentFlag() && !comment.asc_getSolved()) {
// Чистим предыдущий селект
_this.cleanLastSelection();
_this.lastSelectedId = id; _this.lastSelectedId = id;
var col = comment.asc_getCol(); var col = comment.asc_getCol();
......
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