Commit 3f71e29a authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54201 954022d7-b5bf-4e40-9824-e11837661b57
parent 0b35cefe
...@@ -481,31 +481,25 @@ ...@@ -481,31 +481,25 @@
this.m_dScrollX_max = /*this.canvas.offsetWidth +*/ Math.max(this.controller.settings.hscrollStep * hsize, 1); this.m_dScrollX_max = /*this.canvas.offsetWidth +*/ Math.max(this.controller.settings.hscrollStep * hsize, 1);
if(this.Api.isMobileVersion){ if(this.Api.isMobileVersion){
this.MobileTouchManager.Resize();
return; return;
} }
asc_applyFunction(callback, vsize, hsize); asc_applyFunction(callback, vsize, hsize);
}; };
WorkbookView.prototype._onScrollY = function (pos) { WorkbookView.prototype._onScrollY = function (pos) {
// console.log("_onScrollY " + pos)
// document.getElementById("cv1" ).value = "_onScrollY " + pos;
var ws = this.getWorksheet(); var ws = this.getWorksheet();
var delta = asc_round(pos - ws.getFirstVisibleRow(/*allowPane*/true)); var delta = asc_round(pos - ws.getFirstVisibleRow(/*allowPane*/true));
// console.log("deltaY " + delta)
if (delta !== 0) { if (delta !== 0) {
ws.scrollVertical(delta, this.cellEditor); ws.scrollVertical(delta, this.cellEditor,this.Api.isMobileVersion);
} }
}; };
WorkbookView.prototype._onScrollX = function (pos) { WorkbookView.prototype._onScrollX = function (pos) {
// console.log("_onScrollX " + pos)
// document.getElementById("cv1" ).value = "_onScrollX " + pos;
var ws = this.getWorksheet(); var ws = this.getWorksheet();
var delta = asc_round(pos - ws.getFirstVisibleCol(/*allowPane*/true)); var delta = asc_round(pos - ws.getFirstVisibleCol(/*allowPane*/true));
// console.log("deltaX " + delta)
if (delta !== 0) { if (delta !== 0) {
ws.scrollHorizontal(delta, this.cellEditor); ws.scrollHorizontal(delta, this.cellEditor, this.Api.isMobileVersion);
} }
}; };
...@@ -1098,6 +1092,8 @@ ...@@ -1098,6 +1092,8 @@
this._onWSSelectionChanged(ws.getSelectionInfo()); this._onWSSelectionChanged(ws.getSelectionInfo());
this._onSelectionMathInfoChanged(ws.getSelectionMathInfo()); this._onSelectionMathInfoChanged(ws.getSelectionMathInfo());
this.controller.reinitializeScroll(); this.controller.reinitializeScroll();
if(this.Api.isMobileVersion)
this.MobileTouchManager.Resize();
// Zoom теперь на каждом листе одинаковый, не отправляем смену // Zoom теперь на каждом листе одинаковый, не отправляем смену
return this; return this;
}; };
...@@ -1188,6 +1184,7 @@ ...@@ -1188,6 +1184,7 @@
if (this._canResize()) { if (this._canResize()) {
this.getWorksheet().resize(); this.getWorksheet().resize();
this.showWorksheet(undefined, true); this.showWorksheet(undefined, true);
} else { } else {
// ToDo не должно происходить ничего, но нам приходит resize сверху // ToDo не должно происходить ничего, но нам приходит resize сверху
this.showWorksheet(undefined, true); this.showWorksheet(undefined, true);
......
...@@ -4878,7 +4878,7 @@ ...@@ -4878,7 +4878,7 @@
return y - r[vr.r1].top + this.cellsTop < this.drawingCtx.getHeight(); return y - r[vr.r1].top + this.cellsTop < this.drawingCtx.getHeight();
}; };
WorksheetView.prototype._updateVisibleRowsCount = function (skipScrolReinit) { WorksheetView.prototype._updateVisibleRowsCount = function (skipScrollReinit,isMobile) {
this._calcVisibleRows(); this._calcVisibleRows();
if (this._isVisibleY()) { if (this._isVisibleY()) {
do { // Добавим еще строки, чтоб не было видно фон под таблицей do { // Добавим еще строки, чтоб не было видно фон под таблицей
...@@ -4886,13 +4886,13 @@ ...@@ -4886,13 +4886,13 @@
this._calcVisibleRows(); this._calcVisibleRows();
if (this.rows[this.rows.length - 1].height < 0.000001) {break;} if (this.rows[this.rows.length - 1].height < 0.000001) {break;}
} while (this._isVisibleY()); } while (this._isVisibleY());
if (!skipScrolReinit) { if (!skipScrollReinit) {
this.handlers.trigger("reinitializeScrollY"); this.handlers.trigger("reinitializeScrollY");
} }
} }
}; };
WorksheetView.prototype._updateVisibleColsCount = function (skipScrolReinit) { WorksheetView.prototype._updateVisibleColsCount = function (skipScrollReinit,isMobile) {
this._calcVisibleColumns(); this._calcVisibleColumns();
if (this._isVisibleX()) { if (this._isVisibleX()) {
do { // Добавим еще столбцы, чтоб не было видно фон под таблицей do { // Добавим еще столбцы, чтоб не было видно фон под таблицей
...@@ -4900,13 +4900,13 @@ ...@@ -4900,13 +4900,13 @@
this._calcVisibleColumns(); this._calcVisibleColumns();
if (this.cols[this.cols.length - 1].width < 0.000001) {break;} if (this.cols[this.cols.length - 1].width < 0.000001) {break;}
} while (this._isVisibleX()); } while (this._isVisibleX());
if (!skipScrolReinit) { if (!skipScrollReinit) {
this.handlers.trigger("reinitializeScrollX"); this.handlers.trigger("reinitializeScrollX");
} }
} }
}; };
WorksheetView.prototype.scrollVertical = function (delta, editor) { WorksheetView.prototype.scrollVertical = function (delta, editor, isMobile) {
var vr = this.visibleRange; var vr = this.visibleRange;
var start = this._calcCellPosition(vr.c1, vr.r1, 0, delta).row; var start = this._calcCellPosition(vr.c1, vr.r1, 0, delta).row;
var fixStartRow = asc_Range(vr.c1, start, vr.c2, start); var fixStartRow = asc_Range(vr.c1, start, vr.c2, start);
...@@ -4948,7 +4948,7 @@ ...@@ -4948,7 +4948,7 @@
if (this.isCellEditMode && editor) {editor.move(0, -dy);} if (this.isCellEditMode && editor) {editor.move(0, -dy);}
vr.r1 = start; vr.r1 = start;
this._updateVisibleRowsCount(); this._updateVisibleRowsCount(false,isMobile);
this.objectRender.setScrollOffset(); this.objectRender.setScrollOffset();
...@@ -5041,7 +5041,7 @@ ...@@ -5041,7 +5041,7 @@
return this; return this;
}; };
WorksheetView.prototype.scrollHorizontal = function (delta, editor) { WorksheetView.prototype.scrollHorizontal = function (delta, editor, isMobile) {
var vr = this.visibleRange; var vr = this.visibleRange;
var start = this._calcCellPosition(vr.c1, vr.r1, delta, 0).col; var start = this._calcCellPosition(vr.c1, vr.r1, delta, 0).col;
var fixStartCol = asc_Range(start, vr.r1, start, vr.r2); var fixStartCol = asc_Range(start, vr.r1, start, vr.r2);
...@@ -5082,7 +5082,7 @@ ...@@ -5082,7 +5082,7 @@
if (this.isCellEditMode && editor) {editor.move(-dx, 0);} if (this.isCellEditMode && editor) {editor.move(-dx, 0);}
vr.c1 = start; vr.c1 = start;
this._updateVisibleColsCount(); this._updateVisibleColsCount(false,isMobile);
this.objectRender.setScrollOffset(); this.objectRender.setScrollOffset();
......
...@@ -297,9 +297,6 @@ ...@@ -297,9 +297,6 @@
that.vScrollbarIndicator = bar; that.vScrollbarIndicator = bar;
} }
// var percentInViewV = (m.abs(that.maxScrollY) + that.vScrollbarWrapper.clientHeight ) / that.vScrollbarWrapper.clientHeight;
// that.vScrollbarIndicatorSize = m.max(Math.ceil( 1 / percentInViewV * that.vScrollbarWrapper.clientHeight ),8)
that.vScrollbarSize = that.vScrollbarWrapper.clientHeight; that.vScrollbarSize = that.vScrollbarWrapper.clientHeight;
that.vScrollbarIndicatorSize = m.max( m.round( that.vScrollbarSize * that.vScrollbarSize / that.scrollerH ), 8 ); that.vScrollbarIndicatorSize = m.max( m.round( that.vScrollbarSize * that.vScrollbarSize / that.scrollerH ), 8 );
that.vScrollbarIndicator.style.height = that.vScrollbarIndicatorSize + 'px'; that.vScrollbarIndicator.style.height = that.vScrollbarIndicatorSize + 'px';
...@@ -321,9 +318,6 @@ ...@@ -321,9 +318,6 @@
_pos:function ( x, y, isAnim ) { _pos:function ( x, y, isAnim ) {
if ( this.zoomed ) return; if ( this.zoomed ) return;
console.log("this.maxScrollY " + this.maxScrollY);
console.log("this.maxScrollX " + this.maxScrollX);
x = this.hScroll ? x : 0; x = this.hScroll ? x : 0;
y = this.vScroll ? y : 0; y = this.vScroll ? y : 0;
......
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