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