Commit 140741a8 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov

мобильный скролл

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54219 954022d7-b5bf-4e40-9824-e11837661b57
parent 8f36383b
......@@ -130,7 +130,6 @@
// this.element.addEventListener("dblclick" , function () {alert("123");/*return self._onMouseDblClick.apply(self, arguments);*/} , false);
return;
}
this._createScrollBars();
// initialize events
if (window.addEventListener) {
......@@ -358,10 +357,20 @@
};
}
// right bottom corner
var corner = document.createElement('div');
corner.id = "ws-scrollbar-corner";
this.widget.appendChild(corner);
if(!this.view.Api.isMobileVersion){
// right bottom corner
var corner = document.createElement('div');
corner.id = "ws-scrollbar-corner";
this.widget.appendChild(corner);
}
else{
this.hsb.style.zIndex = -10;
this.hsb.style.right = 0;
this.vsb.style.zIndex = -10;
this.vsb.style.bottom = 0;
}
};
/**
......
......@@ -476,14 +476,10 @@
hsize = !whichSB || whichSB === 2 ? ws.getHorizontalScrollRange() : undefined;
if( vsize != undefined )
this.m_dScrollY_max = /*this.canvas.offsetHeight +*/ Math.max(this.controller.settings.vscrollStep * vsize, 1);
this.m_dScrollY_max = Math.max(this.controller.settings.vscrollStep * (vsize + 1), 1);
if( hsize != undefined )
this.m_dScrollX_max = /*this.canvas.offsetWidth +*/ Math.max(this.controller.settings.hscrollStep * hsize, 1);
this.m_dScrollX_max = Math.max(this.controller.settings.hscrollStep * (hsize + 1), 1);
if(this.Api.isMobileVersion){
return;
}
asc_applyFunction(callback, vsize, hsize);
};
......
......@@ -82,11 +82,6 @@
var that = this,
i;
var o = {m_oMainView:{},m_oEditor:{},m_oScrollVerApi:{}}
o.m_oMainView.HtmlElement = o.m_oEditor.HtmlElement = api.canvasOverlay;
o.m_dDocumentWidth = api.canvas.width;
o.m_dDocumentHeight = api.canvas.height;
that.api = api;
that.wrapper = api.element;
that.wrapper.style.overflow = 'hidden';
......@@ -301,7 +296,7 @@
that.vScrollbarIndicatorSize = m.max( m.round( that.vScrollbarSize * that.vScrollbarSize / that.scrollerH ), 8 );
that.vScrollbarIndicator.style.height = that.vScrollbarIndicatorSize + 'px';
that.vScrollbarMaxScroll = that.vScrollbarSize - that.vScrollbarIndicatorSize;
that.vScrollbarProp = that.vScrollbarSize / that.maxScrollY;
that.vScrollbarProp = that.vScrollbarMaxScroll/that.maxScrollY;
// Reset position
that._scrollbarPos( dir, true );
......@@ -333,10 +328,10 @@
if ( this.api.ReaderModeDiv == null ) {
if ( this.hScroll ) {
this.api._onScrollX( -this.x );
this.api._onScrollX( -this.x/this.api.controller.settings.vscrollStep );
}
if ( this.vScroll ) {
this.api._onScrollY( -this.y );
this.api._onScrollY( -this.y/this.api.controller.settings.hscrollStep );
}
}
else if ( this.scroller ) {
......@@ -493,6 +488,7 @@
c1, c2, scale,
timestamp = e.timeStamp || Date.now();
if ( that.options.onBeforeScrollMove ) that.options.onBeforeScrollMove.call( that, e );
// Zoom
......@@ -975,9 +971,6 @@
that.maxScrollX = that.wrapperW - that.scrollerW;
that.maxScrollY = that.wrapperH - that.scrollerH + that.minScrollY;
console.log("that.maxScrollY " + that.maxScrollY);
console.log("that.maxScrollX " + that.maxScrollX);
that._scrollbar( 'h' );
that._scrollbar( 'v' );
},
......
......@@ -67,13 +67,7 @@ function CMobileTouchManager()
CMobileTouchManager.prototype = {
Init : function(ctrl)
{
/*this.HtmlPage = ctrl;
this.LogicDocument = ctrl.m_oLogicDocument;
this.DrawingDocument = ctrl.m_oDrawingDocument;*/
this.iScroll = new window.CTouchScroll(ctrl,{hScrollbar:false,vScrollbar:true,momentum:false}/*, { onAnimationEnd : function(param) {
this.iScroll = new window.CTouchScroll(ctrl,{hScrollbar:true,vScrollbar:true,momentum:false}/*, { onAnimationEnd : function(param) {
param.api.MobileTouchManager.OnScrollAnimationEnd();
} }*/);
// LoadMobileImages();
......
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