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

WorksheetView переделал отправку эвентов на handlers вместо вызова options["name"]

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53314 954022d7-b5bf-4e40-9824-e11837661b57
parent 9f53ba18
......@@ -498,7 +498,7 @@ function asc_CCellCommentator(currentSheet) {
var asc = window["Asc"];
var asc_applyFunction = asc.applyFunction;
var asc_CCollaborativeRange = asc.asc_CCollaborativeRange;
var isViewerMode = function() { return _this.worksheet._trigger("getViewerMode"); };
var isViewerMode = function() { return _this.worksheet.handlers.trigger("getViewerMode"); };
_this.worksheet = currentSheet;
_this.overlayCtx = currentSheet.overlayCtx;
......@@ -1161,7 +1161,7 @@ function asc_CCellCommentator(currentSheet) {
coords.nLeft = (mergedRange ? mergedRange.c2 : comment.nCol) + 1;
if ( !_this.worksheet.cols[coords.nLeft] ) {
_this.worksheet.expandColsOnScroll(true);
_this.worksheet._trigger("reinitializeScrollX");
_this.worksheet.handlers.trigger("reinitializeScrollX");
}
coords.nTop = mergedRange ? mergedRange.r1 : comment.nRow;
......@@ -1357,12 +1357,12 @@ asc_CCellCommentator.prototype = {
if ( (row < vr.r1) || (row > vr.r2) ) {
var offset = row - vr.r1 - Math.round(( vr.r2 - vr.r1 ) / 2);
_this.worksheet.scrollVertical(offset);
_this.worksheet._trigger("reinitializeScrollY");
_this.worksheet.handlers.trigger("reinitializeScrollY");
}
if ( (col < vr.c1) || (col > vr.c2) ) {
var offset = col - vr.c1 - Math.round(( vr.c2 - vr.c1 ) / 2);
_this.worksheet.scrollHorizontal(offset);
_this.worksheet._trigger("reinitializeScrollX");
_this.worksheet.handlers.trigger("reinitializeScrollX");
}
}
......
......@@ -3427,7 +3427,7 @@ function CreateImageDrawingObject(imageUrl, options, drawingObjects) {
object.to.row = cellTo.row;
object.to.rowOff = cellTo.rowOff;
worksheet._trigger("reinitializeScroll");
worksheet.handlers.trigger("reinitializeScroll");
}
function addImageObject(_image) {
......
......@@ -3064,7 +3064,7 @@
autoFilterObject.asc_setX(cell.x1*kF);
autoFilterObject.asc_setWidth(cell.width*kF);
autoFilterObject.asc_setHeight(cell.height*kF);
ws._trigger("setAutoFiltersDialog", autoFilterObject);
ws.handlers.trigger("setAutoFiltersDialog", autoFilterObject);
},
//отрисовка кнопки фильтра
_drawButton: function(x1, y1, options)
......
......@@ -62,7 +62,6 @@
this.Api = Api;
this.collaborativeEditing = collaborativeEditing;
this.lastSendInfoRange = null;
this.lastSendInfoIsSelectOnShape = null;
this.canUpdateAfterShiftUp = false; // Нужно ли обновлять информацию после отпускания Shift
//----- declaration -----
......@@ -403,23 +402,22 @@
_createWorksheetView: function (wsModel) {
var self = this,
opt = $.extend(true, {}, this.settings.worksheetDefaults, {
"getViewerMode" : function () { return self.controller.getViewerMode ? self.controller.getViewerMode() : true; },
"reinitializeScroll" : function () {self.controller.reinitializeScroll(/*All*/);},
"reinitializeScrollY" : function () {self.controller.reinitializeScroll(/*vertical*/1);},
"reinitializeScrollX" : function () {self.controller.reinitializeScroll(/*horizontal*/2);},
"selectionChanged" : function () {self._onWSSelectionChanged.apply(self, arguments);},
"selectionNameChanged" : function () {self._onSelectionNameChanged.apply(self, arguments);},
"selectionMathInfoChanged" : function () {self._onSelectionMathInfoChanged.apply(self, arguments);},
"onErrorEvent" : function (errorId, level) {self.handlers.trigger("asc_onError", errorId, level);},
"slowOperation" : function (isStart) {self.handlers.trigger((isStart ? "asc_onStartAction" : "asc_onEndAction"), c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);},
"setAutoFiltersDialog" : function (arrVal) {self.handlers.trigger("asc_onSetAFDialog", arrVal);},
"selectionRangeChanged" : function (val) {self.handlers.trigger("asc_onSelectionRangeChanged", val);},
"getDCForCharts" : function () { return self.drawingCtxCharts; },
"onRenameCellTextEnd" : function (countFind, countReplace) {self.handlers.trigger("asc_onRenameCellTextEnd", countFind, countReplace);}
});
return new asc_WSV(wsModel, this.buffers, this.stringRender, this.maxDigitWidth, this.collaborativeEditing, opt);
var self = this, opt = $.extend(true, {}, this.settings.worksheetDefaults);
return new asc_WSV(wsModel, /*handlers*/{
"getViewerMode" : function () { return self.controller.getViewerMode ? self.controller.getViewerMode() : true; },
"reinitializeScroll" : function () {self.controller.reinitializeScroll(/*All*/);},
"reinitializeScrollY" : function () {self.controller.reinitializeScroll(/*vertical*/1);},
"reinitializeScrollX" : function () {self.controller.reinitializeScroll(/*horizontal*/2);},
"selectionChanged" : function () {self._onWSSelectionChanged.apply(self, arguments);},
"selectionNameChanged" : function () {self._onSelectionNameChanged.apply(self, arguments);},
"selectionMathInfoChanged" : function () {self._onSelectionMathInfoChanged.apply(self, arguments);},
"onErrorEvent" : function (errorId, level) {self.handlers.trigger("asc_onError", errorId, level);},
"slowOperation" : function (isStart) {self.handlers.trigger((isStart ? "asc_onStartAction" : "asc_onEndAction"), c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);},
"setAutoFiltersDialog" : function (arrVal) {self.handlers.trigger("asc_onSetAFDialog", arrVal);},
"selectionRangeChanged" : function (val) {self.handlers.trigger("asc_onSelectionRangeChanged", val);},
"getDCForCharts" : function () { return self.drawingCtxCharts; },
"onRenameCellTextEnd" : function (countFind, countReplace) {self.handlers.trigger("asc_onRenameCellTextEnd", countFind, countReplace);}
}, this.buffers, this.stringRender, this.maxDigitWidth, this.collaborativeEditing, opt);
},
_onSelectionNameChanged: function (name) {
......
This diff is collapsed.
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