Commit 63d5c00a authored by Alexander.Trofimov's avatar Alexander.Trofimov

check idle in spreadsheets

parent 26d9821e
......@@ -600,6 +600,7 @@
"closed": function () {
self._onCloseCellEditor.apply(self, arguments);
}, "updated": function () {
self.Api.checkLastWork();
self._onUpdateCellEditor.apply(self, arguments);
}, "gotFocus": function (hasFocus) {
self.controller.setFocus(!hasFocus);
......@@ -664,64 +665,63 @@
});
this.wsViewHandlers = new AscCommonExcel.asc_CHandlersList(/*handlers*/{
"getViewerMode": function() {
"getViewerMode": function () {
return self.controller.getViewerMode ? self.controller.getViewerMode() : true;
}, "reinitializeScroll": function() {
}, "reinitializeScroll": function () {
self.controller.reinitializeScroll(/*All*/);
}, "reinitializeScrollY": function() {
}, "reinitializeScrollY": function () {
self.controller.reinitializeScroll(/*vertical*/1);
}, "reinitializeScrollX": function() {
}, "reinitializeScrollX": function () {
self.controller.reinitializeScroll(/*horizontal*/2);
}, "selectionChanged": function() {
}, "selectionChanged": function () {
self._onWSSelectionChanged();
}, "selectionNameChanged": function() {
}, "selectionNameChanged": function () {
self._onSelectionNameChanged.apply(self, arguments);
}, "selectionMathInfoChanged": function() {
}, "selectionMathInfoChanged": function () {
self._onSelectionMathInfoChanged.apply(self, arguments);
},'onFilterInfo': function(countFilter, countRecords) {
}, 'onFilterInfo': function (countFilter, countRecords) {
self.handlers.trigger("asc_onFilterInfo", countFilter, countRecords);
}, "onErrorEvent": function(errorId, level) {
}, "onErrorEvent": function (errorId, level) {
self.handlers.trigger("asc_onError", errorId, level);
}, "slowOperation": function(isStart) {
(isStart ? self.Api.sync_StartAction : self.Api.sync_EndAction).call(self.Api, c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);
}, "setAutoFiltersDialog": function(arrVal) {
}, "slowOperation": function (isStart) {
(isStart ? self.Api.sync_StartAction : self.Api.sync_EndAction).call(self.Api,
c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);
}, "setAutoFiltersDialog": function (arrVal) {
self.handlers.trigger("asc_onSetAFDialog", arrVal);
}, "selectionRangeChanged": function(val) {
}, "selectionRangeChanged": function (val) {
self.handlers.trigger("asc_onSelectionRangeChanged", val);
}, "onRenameCellTextEnd": function(countFind, countReplace) {
}, "onRenameCellTextEnd": function (countFind, countReplace) {
self.handlers.trigger("asc_onRenameCellTextEnd", countFind, countReplace);
}, 'onStopFormatPainter': function() {
}, 'onStopFormatPainter': function () {
self._onStopFormatPainter();
}, 'getRangeFormatPainter': function() {
}, 'getRangeFormatPainter': function () {
return self.rangeFormatPainter;
},"onDocumentPlaceChanged": function() {
}, "onDocumentPlaceChanged": function () {
self._onDocumentPlaceChanged();
}, "updateSheetViewSettings": function() {
}, "updateSheetViewSettings": function () {
self.handlers.trigger("asc_onUpdateSheetViewSettings");
}, "onScroll": function(d) {
}, "onScroll": function (d) {
self.controller.scroll(d);
}, "getLockDefNameManagerStatus": function() {
}, "getLockDefNameManagerStatus": function () {
return self.defNameAllowCreate;
}, 'isActive': function() {
}, 'isActive': function () {
return (-1 === self.copyActiveSheet || self.wsActive === self.copyActiveSheet);
},
"getCellEditMode": function() {
}, "getCellEditMode": function () {
return self.isCellEditMode;
},
"drawMobileSelection" : function(color) {
if (self.MobileTouchManager)
{
}, "drawMobileSelection": function (color) {
if (self.MobileTouchManager) {
var _canvas = self.getWorksheet().objectRender.getDrawingCanvas();
if (_canvas)
if (_canvas) {
self.MobileTouchManager.CheckSelect(_canvas.trackOverlay, color);
}
},
"showSpecialPasteOptions": function(val) {
}
}, "showSpecialPasteOptions": function (val) {
self.handlers.trigger("asc_onShowSpecialPasteOptions", val);
if(!window['AscCommon'].g_clipboardBase.showSpecialPasteButton)
{
if (!window['AscCommon'].g_clipboardBase.showSpecialPasteButton) {
window['AscCommon'].g_clipboardBase.showSpecialPasteButton = true;
}
}, 'checkLastWork': function () {
self.Api.checkLastWork();
}
});
......
......@@ -1966,6 +1966,7 @@
if (lockDraw || this.model.workbook.bCollaborativeChanges || window['IS_NATIVE_EDITOR']) {
return this;
}
this.handlers.trigger("checkLastWork");
this._clean();
this._drawCorner();
this._drawColumnHeaders(/*drawingCtx*/ undefined);
......@@ -3736,6 +3737,8 @@
return;
}
this.handlers.trigger("checkLastWork");
// set clipping rect to cells area
var ctx = this.overlayCtx;
ctx.save().beginPath()
......@@ -6031,6 +6034,7 @@
};
WorksheetView.prototype.getCursorTypeFromXY = function (x, y, isViewerMode) {
this.handlers.trigger("checkLastWork");
var res, c, r, f, i, offsetX, offsetY, cellCursor;
var sheetId = this.model.getId(), userId, lockRangePosLeft, lockRangePosTop, lockInfo, oHyperlink;
var widthDiff = 0, heightDiff = 0, isLocked = false, target = c_oTargetType.Cells, row = -1, col = -1, isSelGraphicObject, isNotFirst;
......
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