Commit 7d0c2891 authored by Alexander.Trofimov's avatar Alexander.Trofimov

scroll iscroll to function-closure

parent 25026b5b
......@@ -13,8 +13,12 @@
"../common/NumFormat.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/Format/Format.js",
"../common/Charts/charts.js",
"../common/scroll.js",
"../cell/view/iscroll.js",
"../common/wordcopypaste.js",
"../cell/apiDefines.js",
......@@ -61,7 +65,6 @@
"../cell/model/History.js",
"../cell/model/CellComment.js",
"../cell/view/mobileTouch.js",
"../cell/view/iscroll.js",
"../cell/view/StringRender.js",
"../cell/view/CellTextRender.js",
"../cell/view/CellEditorView.js",
......@@ -69,7 +72,6 @@
"../cell/view/HandlerList.js",
"../cell/view/EventsController.js",
"../cell/view/WorkbookView.js",
"../common/scroll.js",
"../word/Editor/SerializeCommon.js",
"../common/Drawings/Math.js",
"../common/Drawings/ArcTo.js",
......@@ -89,7 +91,6 @@
"../common/Drawings/TrackObjects/Spline.js",
"../common/Drawings/TrackObjects/MoveTracks.js",
"../common/Drawings/CommonController.js",
"../common/Drawings/Format/Format.js",
"../common/Drawings/Format/CreateGeometry.js",
"../common/Drawings/Format/Geometry.js",
"../common/Drawings/Format/Path.js",
......
......@@ -13,8 +13,11 @@
"../common/NumFormat.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/Format/Format.js",
"../common/Charts/charts.js",
"../common/scroll.js",
"../common/wordcopypaste.js",
"../slide/apiDefines.js",
......@@ -48,7 +51,6 @@
"../word/Editor/Table/TableCell.js",
"../word/Editor/Common.js",
"../word/Editor/Sections.js",
"../common/scroll.js",
"../word/Editor/History.js",
"../common/Drawings/Hit.js",
"../common/Drawings/States.js",
......@@ -77,7 +79,6 @@
"../common/Drawings/CommonController.js",
"../cell/view/DrawingObjectsController.js",
"../slide/Editor/DrawingObjectsController.js",
"../common/Drawings/Format/Format.js",
"../common/Drawings/Format/CreateGeometry.js",
"../common/Drawings/Format/Geometry.js",
"../common/Drawings/Format/Path.js",
......
......@@ -16,8 +16,12 @@
"../common/NumFormat.js",
"../common/Drawings/Format/Constants.js",
"../common/Drawings/Format/Format.js",
"../common/Charts/charts.js",
"../common/scroll.js",
"../common/Scrolls/iscroll.js",
"../common/wordcopypaste.js",
"../word/apiDefines.js",
......@@ -25,7 +29,6 @@
"../common/Shapes/SerializeWriter.js",
"../common/SerializeCommonWordExcel.js",
"../common/SerializeChart.js",
"../common/Drawings/Format/Format.js",
"../common/FontsFreeType/font_engine.js",
"../common/FontsFreeType/FontFile.js",
"../common/FontsFreeType/FontManager.js",
......@@ -106,13 +109,11 @@
"../common/CollaborativeEditingBase.js",
"../word/Drawing/DrawingDocument.js",
"../word/Drawing/GraphicsEvents.js",
"../common/Scrolls/iscroll.js",
"../word/Drawing/WorkEvents.js",
"../common/Controls.js",
"../word/Drawing/Rulers.js",
"../word/Drawing/HtmlPage.js",
"../word/Drawing/documentrenderer.js",
"../common/scroll.js",
"../word/Editor/SerializeCommon.js",
"../common/apiBase.js",
"../word/api.js",
......
......@@ -373,7 +373,7 @@
this.vsbHSt = document.getElementById("ws-v-scroll-helper").style;
if (!this.vsbApi) {
this.vsbApi = new ScrollObject(this.vsb.id, opt);
this.vsbApi = new AscCommon.ScrollObject(this.vsb.id, opt);
this.vsbApi.bind("scrollvertical", function(evt) {
self.handlers.trigger("scrollY", evt.scrollPositionY / opt.vscrollStep);
});
......@@ -396,7 +396,7 @@
this.hsbHSt = document.getElementById("ws-h-scroll-helper").style;
if (!this.hsbApi) {
this.hsbApi = new ScrollObject(this.hsb.id, $.extend(true, {}, opt, {wheelScrollLines: 1}));
this.hsbApi = new AscCommon.ScrollObject(this.hsb.id, $.extend(true, {}, opt, {wheelScrollLines: 1}));
this.hsbApi.bind("scrollhorizontal",function(evt) {
self.handlers.trigger("scrollX", evt.scrollPositionX / opt.hscrollStep);
});
......
......@@ -1254,6 +1254,7 @@
dummyStyle = null; // for the sake of it
window.CTouchScroll = CTouchScroll;
window.CTouchScroll;
//---------------------------------------------------------export---------------------------------------------------
window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window["AscCommonExcel"].CTouchScroll = CTouchScroll;
})( window, document );
......@@ -90,7 +90,7 @@ function CMobileTouchManager()
this.longTapFlag = false;
this.longTapTimer = -1;
this.mylatesttap = null
this.mylatesttap = null;
this.zoomFactor = 1;
this.wasZoom = false;
this.canZoom = true;
......@@ -99,7 +99,7 @@ function CMobileTouchManager()
CMobileTouchManager.prototype.Init = function(ctrl)
{
this.ctrl = ctrl;
this.iScroll = new window.CTouchScroll(ctrl,{hScrollbar:true,vScrollbar:true,momentum:false}/*, { onAnimationEnd : function(param) {
this.iScroll = new AscCommonExcel.CTouchScroll(ctrl,{hScrollbar:true,vScrollbar:true,momentum:false}/*, { onAnimationEnd : function(param) {
param.api.MobileTouchManager.OnScrollAnimationEnd();
} }*/);
};
......
......@@ -1257,7 +1257,8 @@ function prefixStyle (style) {
dummyStyle = null; // for the sake of it
window.CTouchScroll = CTouchScroll;
window.CTouchScroll;
//---------------------------------------------------------export---------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window["AscCommon"].CTouchScroll = CTouchScroll;
})(window, document);
......@@ -24,6 +24,11 @@
*/
"use strict";
( /**
* @param {Window} window
* @param {undefined} undefined
*/
function (window, undefined) {
var debug = false;
var ScrollArrowType = {
......@@ -47,7 +52,7 @@ var ArrowStatus = {
upLeftArrowNonActive_downRightArrowActive:3,
upLeftArrowNonActive_downRightArrowNonActive:4,
arrowHover:5
}
};
function GetClientWidth( elem ) {
var _w = elem.clientWidth;
......@@ -304,7 +309,7 @@ CArrowDrawer.prototype.InitSize = function ( sizeW, sizeH, is_retina ) {
this.SizeW >>= 1;
this.SizeH >>= 1;
}
}
};
CArrowDrawer.prototype.drawArrow = function ( type, mode, ctx, w, h ) {
ctx.beginPath();
......@@ -584,7 +589,7 @@ CArrowDrawer.prototype.drawArrow = function ( type, mode, ctx, w, h ) {
this.lastArrowStatus1 = mode;
}
};
CArrowDrawer.prototype.drawTopLeftArrow = function(type,mode,ctx,w,h){
clearTimeout( this.fadeInTimeout1 );
......@@ -1012,7 +1017,7 @@ CArrowDrawer.prototype.drawTopLeftArrow = function(type,mode,ctx,w,h){
this.lastArrowStatus1 = mode;
}
};
CArrowDrawer.prototype.drawBottomRightArrow = function(type,mode,ctx,w,h){
clearTimeout( this.fadeInTimeout2 );
......@@ -1449,7 +1454,7 @@ CArrowDrawer.prototype.drawBottomRightArrow = function(type,mode,ctx,w,h){
}
this.lastArrowStatus2 = mode;
}
};
function _HEXTORGB_( colorHEX ) {
return {
......@@ -1487,7 +1492,7 @@ function ScrollObject( elemID, settings, dbg ) {
}
}
return _st;
}
};
var scrollSettings = {
showArrows:false,
......@@ -1605,8 +1610,8 @@ function ScrollObject( elemID, settings, dbg ) {
if ( window.devicePixelRatio == 2 )
this.IsRetina = true;
this.piperImgVert = [document.createElement( 'canvas' ), document.createElement( 'canvas' )]
this.piperImgHor = [document.createElement( 'canvas' ), document.createElement( 'canvas' )]
this.piperImgVert = [document.createElement( 'canvas' ), document.createElement( 'canvas' )];
this.piperImgHor = [document.createElement( 'canvas' ), document.createElement( 'canvas' )];
this.piperImgVert[0].height = 13;
this.piperImgVert[1].height = 13;
......@@ -3337,3 +3342,8 @@ ScrollObject.prototype = {
handle( that );
}
};
//---------------------------------------------------------export---------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window["AscCommon"].ScrollObject = ScrollObject;
})(window);
......@@ -4444,7 +4444,7 @@ function CThumbnailsManager()
}
else
{
word_control.m_oScrollThumb_ = new ScrollObject( "id_vertical_scroll_thmbnl",settings);
word_control.m_oScrollThumb_ = new AscCommon.ScrollObject( "id_vertical_scroll_thmbnl",settings);
word_control.m_oScrollThumb_.bind("scrollvertical",function(evt){
oThis.verticalScroll(this,evt.scrollD,evt.maxScrollY);
});
......
......@@ -2302,7 +2302,7 @@ function CEditorPage(api)
if (this.m_oScrollHor_)
this.m_oScrollHor_.Repos(settings, true, undefined);//unbind("scrollhorizontal")
else {
this.m_oScrollHor_ = new ScrollObject( "id_horizontal_scroll",settings);
this.m_oScrollHor_ = new AscCommon.ScrollObject( "id_horizontal_scroll",settings);
this.m_oScrollHor_.bind("scrollhorizontal",function(evt){
oThis.horizontalScroll(this,evt.scrollD,evt.maxScrollX);
});
......@@ -2326,7 +2326,7 @@ function CEditorPage(api)
else
{
this.m_oScrollVer_ = new ScrollObject( "id_vertical_scroll",
this.m_oScrollVer_ = new AscCommon.ScrollObject( "id_vertical_scroll",
settings
);
......@@ -2361,7 +2361,7 @@ function CEditorPage(api)
}
else
{
this.m_oScrollNotes_ = new ScrollObject( "id_vertical_scroll_notes",settings);
this.m_oScrollNotes_ = new AscCommon.ScrollObject( "id_vertical_scroll_notes",settings);
this.m_oScrollNotes_.bind("scrollvertical",function(evt){
});
this.m_oScrollNotesApi = this.m_oScrollNotes_;
......
......@@ -2795,7 +2795,7 @@ function CEditorPage(api)
if (this.m_oScrollHor_)
this.m_oScrollHor_.Repos(settings, this.m_bIsHorScrollVisible);
else {
this.m_oScrollHor_ = new ScrollObject( "id_horizontal_scroll", settings );
this.m_oScrollHor_ = new AscCommon.ScrollObject( "id_horizontal_scroll", settings );
this.m_oScrollHor_.onLockMouse = function(evt){
check_MouseDownEvent(evt, true);
......@@ -2814,7 +2814,7 @@ function CEditorPage(api)
this.m_oScrollVer_.Repos(settings, undefined, true);
}
else {
this.m_oScrollVer_ = new ScrollObject( "id_vertical_scroll", settings );
this.m_oScrollVer_ = new AscCommon.ScrollObject( "id_vertical_scroll", settings );
this.m_oScrollVer_.onLockMouse = function(evt){
check_MouseDownEvent(evt, true);
......
......@@ -780,7 +780,7 @@ function CMobileTouchManager()
this.LogicDocument = ctrl.m_oLogicDocument;
this.DrawingDocument = ctrl.m_oDrawingDocument;
this.iScroll = new window.CTouchScroll(ctrl, { onAnimationEnd : function(param) {
this.iScroll = new AscCommon.CTouchScroll(ctrl, { onAnimationEnd : function(param) {
param.api.MobileTouchManager.OnScrollAnimationEnd();
} });
......@@ -2720,7 +2720,7 @@ function CReaderTouchManager()
this.LogicDocument = ctrl.m_oLogicDocument;
this.DrawingDocument = ctrl.m_oDrawingDocument;
this.iScroll = new window.CTouchScroll(ctrl, {bounce : true}, this.HtmlPage.ReaderModeDiv);
this.iScroll = new AscCommon.CTouchScroll(ctrl, {bounce : true}, this.HtmlPage.ReaderModeDiv);
this.HtmlPage.m_oApi.asc_fireCallback("asc_onHidePopMenu");
}
......
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