new SimuScroll(cfg)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfg |
object |
config for scroll
|
Example
var xscroll = new SimuScroll({
renderTo:"#scroll",
lockX:false,
scrollbarX:true
});
xscroll.render();
Extends
Methods
-
staticSimuScroll.boundryCheck(){SimuScroll}
-
bounce to the boundry vertical and horizontal
-
staticSimuScroll.boundryCheckX(){SimuScroll}
-
bounce to the boundry horizontal
-
staticSimuScroll.boundryCheckY(){SimuScroll}
-
bounce to the boundry vertical
-
staticSimuScroll.computeScroll(zoomType, velocity){Object}
-
compute scroll transition by zoomType and velocity
Name Type Description zoomType
string zoomType of scrolling velocity
number velocity after panend Example
var info = xscroll.computeScroll("x",2); // return {pos:90,easing:"easing",status:"inside",duration:500}
-
staticSimuScroll.destroyScrollBars(){SimuScroll}
-
destroy scrollbars
-
staticSimuScroll.getBoundryOutBottom(){number}
-
get the offset value outsideof bottom
-
staticSimuScroll.getBoundryOutLeft(){number}
-
get the offset value outsideof left
-
staticSimuScroll.getBoundryOutRight(){number}
-
get the offset value outsideof right
-
staticSimuScroll.getBoundryOutTop(){number}
-
get the offset value outsideof top
-
staticSimuScroll.getScrollLeft(){number}
-
get scroll left value
-
staticSimuScroll.getScrollTop(){number}
-
get scroll top value
-
staticSimuScroll.init()
-
-
staticSimuScroll.initController(){SimuScroll}
-
init controller for multi-scrollers
-
staticSimuScroll.initScrollBars(){SimuScroll}
-
init scrollbars
-
staticSimuScroll.isBoundryOut(){boolean}
-
judge the scroller is out of boundry horizontally and vertically
-
staticSimuScroll.isBoundryOutBottom(){boolean}
-
judge if the scroller is outsideof bottom
-
staticSimuScroll.isBoundryOutLeft(){boolean}
-
judge if the scroller is outsideof left
-
staticSimuScroll.isBoundryOutRight(){boolean}
-
judge if the scroller is outsideof right
-
staticSimuScroll.isBoundryOutTop(){boolean}
-
judge if the scroller is outsideof top
-
staticSimuScroll.render(){SimuScroll}
-
render scroll
-
staticSimuScroll.scrollLeft(scrollLeft, duration, easing)
-
horizontal scroll absolute to the destination
Name Type Description scrollLeft
number scrollLeft duration
number duration for animte easing
string easing functio for animate : ease-in | ease-in-out | ease | bezier(n,n,n,n) -
staticSimuScroll.scrollLeft(scrollLeft, duration, easing)
-
horizontal scroll absolute to the destination
Name Type Description scrollLeft
number scrollLeft duration
number duration for animte easing
string easing functio for animate : ease-in | ease-in-out | ease | bezier(n,n,n,n) -
staticSimuScroll.scrollTop(scrollTop, duration, easing)
-
vertical scroll absolute to the destination
Name Type Description scrollTop
number scrollTop duration
number duration for animte easing
string easing functio for animate : ease-in | ease-in-out | ease | bezier(n,n,n,n) -
staticSimuScroll.scrollTop(scrollTop, duration, easing)
-
vertical scroll absolute to the destination
Name Type Description scrollTop
number scrollTop duration
number duration for animte easing
string easing functio for animate : ease-in | ease-in-out | ease | bezier(n,n,n,n) -
staticSimuScroll.stop(){SimuScroll}
-
stop scrolling immediatelly
-
staticSimuScroll.translate(x, y, scale)
-
translate the scroller to a new destination includes x , y , scale
Name Type Description x
number x y
number y scale
number scale