scroll.js revision 47acdd6b92f6923019c323956cca0e113348158f
2488N/A * @description Internal config option to hold the node that we are scrolling. Should not be set by the developer.
parentScroll: {
value: false,
if (node) {
return node;
buffer: {
scrollDelay: {
host: {
value: null
windowScroll: {
value: false,
vertical: {
value: true,
horizontal: {
value: true,
_scrolling: null,
_vpRegionCache: null,
_dimCache: null,
_scrollTimer: null,
* @description Sets the _vpRegionCache property with an Object containing the dims from the viewport.
_getVPRegion: function() {
top: t + b,
left: l + b
this._vpRegionCache = r;
initializer: function() {
this._vpRegionCache = null;
* @description Check to see if we need to fire the scroll timer. If scroll timer is running this will scroll the window.
var r = this._getVPRegion(),
scroll = false,
w = this._dimCache.w,
h = this._dimCache.h,
scroll = true;
scroll = true;
scroll = true;
scroll = true;
if (move) {
this._cancelScroll();
if (scroll) {
this._initScroll();
this._cancelScroll();
_initScroll: function() {
this._cancelScroll();
this._scrollTimer = Y.Lang.later(this.get('scrollDelay'), this, this._checkWinScroll, [true], true);
_cancelScroll: function() {
this._scrolling = false;
if (this._scrollTimer) {
delete this._scrollTimer;
align: function(e) {
if (this._scrolling) {
this._cancelScroll();
e.preventDefault();
if (!this._scrolling) {
this._checkWinScroll();
_setDimCache: function() {
this._dimCache = {
start: function() {
this._setDimCache();
this._dimCache = null;
this._cancelScroll();
toString: function() {
WS = function() {
windowScroll: {
value: true,
if (scroll) {
return scroll;
initializer: function() {
* @description The Scroll instance will be placed on the Drag instance under the winscroll namespace.
NS = function() {
node: {
value: false,
if (node !== false) {
initializer: function() {