Commit 9554ddc1 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@48511 954022d7-b5bf-4e40-9824-e11837661b57
parent 86c5f09b
...@@ -2188,6 +2188,7 @@ function DrawingObjects() { ...@@ -2188,6 +2188,7 @@ function DrawingObjects() {
worksheet._drawGrid(); worksheet._drawGrid();
worksheet._drawCells(); worksheet._drawCells();
worksheet._drawCellsBorders(); worksheet._drawCellsBorders();
if ( !_this.selectedGraphicObjectsExists() )
worksheet._drawSelection(); worksheet._drawSelection();
} }
...@@ -2230,13 +2231,13 @@ function DrawingObjects() { ...@@ -2230,13 +2231,13 @@ function DrawingObjects() {
if ( drawingCtx ) { if ( drawingCtx ) {
// всё чистим
if ( clearCanvas )
_this.clearDrawingObjects();
if ( !_this.countDrawingObjects() ) if ( !_this.countDrawingObjects() )
return; return;
if ( clearCanvas )
_this.clearDrawingObjects();
worksheet._drawGraphic();
worksheet.model.Drawings = aObjects; worksheet.model.Drawings = aObjects;
for (var i = 0; i < _this.countDrawingObjects(); i++) { for (var i = 0; i < _this.countDrawingObjects(); i++) {
...@@ -2286,7 +2287,7 @@ function DrawingObjects() { ...@@ -2286,7 +2287,7 @@ function DrawingObjects() {
_this.showOverlayGraphicObjects = function() { _this.showOverlayGraphicObjects = function() {
shapeOverlayCtx.put_GlobalAlpha(true, 0.5); shapeOverlayCtx.put_GlobalAlpha(true, 0.5);
shapeOverlayCtx.m_oContext.clearRect(0, 0, shapeOverlayCtx.m_lWidthPix, shapeOverlayCtx.m_lHeightPix); shapeOverlayCtx.m_oContext.clearRect(0, 0, shapeOverlayCtx.m_lWidthPix, shapeOverlayCtx.m_lHeightPix);
worksheet._drawSelection(); worksheet._drawGraphic();
_this.controller.drawTracks(shapeOverlayCtx); _this.controller.drawTracks(shapeOverlayCtx);
shapeOverlayCtx.put_GlobalAlpha(true, 1); shapeOverlayCtx.put_GlobalAlpha(true, 1);
} }
...@@ -3161,6 +3162,7 @@ function DrawingObjects() { ...@@ -3161,6 +3162,7 @@ function DrawingObjects() {
} }
} }
_this.raiseLayerDrawingObjects();
_this.controller.drawSelection(_this.drawingDocument); _this.controller.drawSelection(_this.drawingDocument);
} }
_this.drawWorksheetHeaders(); _this.drawWorksheetHeaders();
......
...@@ -1406,7 +1406,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1406,7 +1406,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
_onShowComments: function () { _onShowComments: function () {
if (this.wb) { if (this.wb) {
this.wb.getWorksheet().cellCommentator.drawCommentCells(false); this.wb.getWorksheet().cellCommentator.drawCommentCells();
} }
}, },
......
...@@ -699,16 +699,11 @@ function asc_CCellCommentator(currentSheet) { ...@@ -699,16 +699,11 @@ function asc_CCellCommentator(currentSheet) {
return (findCol && findRow) ? _this.asc_getComments(findCol.col, findRow.row) : []; return (findCol && findRow) ? _this.asc_getComments(findCol.col, findRow.row) : [];
} }
_this.drawCommentCells = function(clearOverlay) { _this.drawCommentCells = function() {
if ( isViewerMode() ) if ( isViewerMode() )
return; return;
if (clearOverlay) {
//_this.overlayCtx.clear();
//_this.worksheet._drawSelection();
}
if (!_this.bShow) if (!_this.bShow)
return; return;
...@@ -813,7 +808,7 @@ function asc_CCellCommentator(currentSheet) { ...@@ -813,7 +808,7 @@ function asc_CCellCommentator(currentSheet) {
var commentList = _this.asc_getComments(comment.asc_getCol(), comment.asc_getRow()); var commentList = _this.asc_getComments(comment.asc_getCol(), comment.asc_getRow());
if (commentList.length) { if (commentList.length) {
_this.drawCommentCells(true); _this.drawCommentCells();
var coords = _this.getCommentsCoords(commentList); var coords = _this.getCommentsCoords(commentList);
var indexes = []; var indexes = [];
...@@ -842,7 +837,6 @@ function asc_CCellCommentator(currentSheet) { ...@@ -842,7 +837,6 @@ function asc_CCellCommentator(currentSheet) {
function updateCommentsList(aComments) { function updateCommentsList(aComments) {
if ( aComments.length ) { if ( aComments.length ) {
//History.StartTransaction();
_this.bSaveHistory = false; _this.bSaveHistory = false;
for (var i = 0; i < aComments.length; i++) { for (var i = 0; i < aComments.length; i++) {
...@@ -855,9 +849,7 @@ function asc_CCellCommentator(currentSheet) { ...@@ -855,9 +849,7 @@ function asc_CCellCommentator(currentSheet) {
_this.asc_removeComment(aComments[i].comment.asc_getId()); _this.asc_removeComment(aComments[i].comment.asc_getId());
} }
_this.bSaveHistory = true; _this.bSaveHistory = true;
_this.drawCommentCells();
//History.EndTransaction();
_this.drawCommentCells(false);
} }
} }
...@@ -1003,7 +995,7 @@ function asc_CCellCommentator(currentSheet) { ...@@ -1003,7 +995,7 @@ function asc_CCellCommentator(currentSheet) {
} }
History.EndTransaction(); History.EndTransaction();
_this.drawCommentCells(false); _this.drawCommentCells();
} }
} }
...@@ -1040,7 +1032,7 @@ function asc_CCellCommentator(currentSheet) { ...@@ -1040,7 +1032,7 @@ function asc_CCellCommentator(currentSheet) {
} }
History.EndTransaction(); History.EndTransaction();
_this.drawCommentCells(false); _this.drawCommentCells();
} }
} }
...@@ -1271,13 +1263,13 @@ asc_CCellCommentator.prototype = { ...@@ -1271,13 +1263,13 @@ asc_CCellCommentator.prototype = {
asc_showComments: function() { asc_showComments: function() {
var _this = this; var _this = this;
_this.bShow = true; _this.bShow = true;
_this.drawCommentCells(true); _this.drawCommentCells();
}, },
asc_hideComments: function() { asc_hideComments: function() {
var _this = this; var _this = this;
_this.bShow = false; _this.bShow = false;
_this.drawCommentCells(true); _this.drawCommentCells();
_this.worksheet.model.workbook.handlers.trigger("asc_onHideComment"); _this.worksheet.model.workbook.handlers.trigger("asc_onHideComment");
}, },
...@@ -1311,7 +1303,7 @@ asc_CCellCommentator.prototype = { ...@@ -1311,7 +1303,7 @@ asc_CCellCommentator.prototype = {
_this.worksheet.model.workbook.handlers.trigger("asc_onHideComment"); _this.worksheet.model.workbook.handlers.trigger("asc_onHideComment");
_this.worksheet.model.workbook.handlers.trigger("asc_onShowComment", indexes, coords.asc_getLeftPX(), coords.asc_getTopPX(), coords.asc_getReverseLeftPX()); _this.worksheet.model.workbook.handlers.trigger("asc_onShowComment", indexes, coords.asc_getLeftPX(), coords.asc_getTopPX(), coords.asc_getReverseLeftPX());
_this.drawCommentCells(true); _this.drawCommentCells();
} }
_this.lastSelectedId = id; _this.lastSelectedId = id;
} }
...@@ -1414,7 +1406,7 @@ asc_CCellCommentator.prototype = { ...@@ -1414,7 +1406,7 @@ asc_CCellCommentator.prototype = {
History.Add(g_oUndoRedoComment, historyitem_Comment_Add, _this.worksheet.model.getId(), null, new asc_CCommentData(oComment)); History.Add(g_oUndoRedoComment, historyitem_Comment_Add, _this.worksheet.model.getId(), null, new asc_CCommentData(oComment));
_this.aComments.push(oComment); _this.aComments.push(oComment);
_this.drawCommentCells(false); _this.drawCommentCells();
_this.worksheet.model.workbook.handlers.trigger("asc_onAddComment", oComment.asc_getId(), oComment); _this.worksheet.model.workbook.handlers.trigger("asc_onAddComment", oComment.asc_getId(), oComment);
} }
...@@ -1475,7 +1467,7 @@ asc_CCellCommentator.prototype = { ...@@ -1475,7 +1467,7 @@ asc_CCellCommentator.prototype = {
History.Add(g_oUndoRedoComment, historyitem_Comment_Change, _this.worksheet.model.getId(), null, compositeComment); History.Add(g_oUndoRedoComment, historyitem_Comment_Change, _this.worksheet.model.getId(), null, compositeComment);
} }
_this.drawCommentCells(true); _this.drawCommentCells();
} }
} }
...@@ -1527,7 +1519,7 @@ asc_CCellCommentator.prototype = { ...@@ -1527,7 +1519,7 @@ asc_CCellCommentator.prototype = {
} }
} }
} }
_this.drawCommentCells(true); _this.drawCommentCells();
_this.worksheet.model.workbook.handlers.trigger("asc_onRemoveComment", id); _this.worksheet.model.workbook.handlers.trigger("asc_onRemoveComment", id);
} }
} }
......
...@@ -2791,8 +2791,7 @@ ...@@ -2791,8 +2791,7 @@
if (!range && !aFHIntersection && !this.isFormulaEditMode && !this.activeMoveRange && !this.isChartAreaEditMode) { if (!range && !aFHIntersection && !this.isFormulaEditMode && !this.activeMoveRange && !this.isChartAreaEditMode) {
this._drawActiveHeaders(); this._drawActiveHeaders();
this.autoFilters.drawAutoF(this); this._drawGraphic();
this.cellCommentator.drawCommentCells(false);
return; return;
} }
...@@ -3017,9 +3016,7 @@ ...@@ -3017,9 +3016,7 @@
// restore canvas' original clipping range // restore canvas' original clipping range
ctx.restore(); ctx.restore();
this._drawGraphic();
this.autoFilters.drawAutoF(this);
this.cellCommentator.drawCommentCells(false);
if ( !this.isChartAreaEditMode ){ if ( !this.isChartAreaEditMode ){
this.objectRender.showDrawingObjectsLocks(); this.objectRender.showDrawingObjectsLocks();
...@@ -3216,6 +3213,11 @@ ...@@ -3216,6 +3213,11 @@
ctx.restore(); ctx.restore();
}, },
_drawGraphic: function() {
this.autoFilters.drawAutoF(this);
this.cellCommentator.drawCommentCells();
},
cleanSelection: function () { cleanSelection: function () {
var ctx = this.overlayCtx; var ctx = this.overlayCtx;
var arn = this.activeRange.clone(true); var arn = this.activeRange.clone(true);
...@@ -5856,6 +5858,8 @@ ...@@ -5856,6 +5858,8 @@
if (isCoord) { if (isCoord) {
var drawingInfo = this.objectRender.checkCursorDrawingObject(x, y); var drawingInfo = this.objectRender.checkCursorDrawingObject(x, y);
if ( drawingInfo ) { if ( drawingInfo ) {
this.overlayCtx.clear();
this._drawGraphic();
this.objectRender.selectGraphicObject(); this.objectRender.selectGraphicObject();
} }
else { else {
...@@ -8263,11 +8267,8 @@ ...@@ -8263,11 +8267,8 @@
if (isUpdateCols) { t._updateVisibleColsCount(); } if (isUpdateCols) { t._updateVisibleColsCount(); }
if (isUpdateRows) { t._updateVisibleRowsCount(); } if (isUpdateRows) { t._updateVisibleRowsCount(); }
if (false === lockDraw) { if (false === lockDraw)
t.autoFilters.drawAutoF(t);
t.cellCommentator.drawCommentCells(false);
t.objectRender.showDrawingObjects(true); t.objectRender.showDrawingObjects(true);
}
}, },
expandColsOnScroll: function (isNotActive, updateColsCount, newColsCount) { expandColsOnScroll: function (isNotActive, updateColsCount, newColsCount) {
......
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