From de717077c4b18a798aaee06e3defd08f655354a0 Mon Sep 17 00:00:00 2001 From: Raphael Eidus Date: Sun, 11 May 2014 17:21:45 -0400 Subject: [PATCH] change offsetBot to offsetBottom --- README.md | 4 ++-- dist/echo.js | 4 ++-- dist/echo.min.js | 2 +- src/echo.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 10e64df..53df7ed 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,10 @@ Type: `Number|String` Default: `offsetVertical`'s value The `offsetTop` option allows you to specify how far above the viewport you want Echo to _begin_ loading your images. -#### offsetBot +#### offsetBottom Type: `Number|String` Default: `offsetVertical`'s value -The `offsetBot` option allows you to specify how far below the viewport you want Echo to _begin_ loading your images. +The `offsetBottom` option allows you to specify how far below the viewport you want Echo to _begin_ loading your images. #### offsetLeft Type: `Number|String` Default: `offsetVertical`'s value diff --git a/dist/echo.js b/dist/echo.js index 1f284aa..a979be7 100644 --- a/dist/echo.js +++ b/dist/echo.js @@ -103,7 +103,7 @@ window.Echo = (function (global, document, undefined) { * @param {Object} [opts] Passed in Object with options * @param {Number|String} [opts.throttle] * @param {Number|String} [opts.offset] - * @param {Number|String} [opts.offsetBot] + * @param {Number|String} [opts.offsetBottom] * @param {Number|String} [opts.offsetTop] * @param {Number|String} [opts.offsetLeft] * @param {Number|String} [opts.offsetRight] @@ -124,7 +124,7 @@ window.Echo = (function (global, document, undefined) { offset = { t: optionToInt(opts.offsetTop, offsetVertical), - b: optionToInt(opts.offsetBot, offsetVertical), + b: optionToInt(opts.offsetBottom, offsetVertical), l: optionToInt(opts.offsetLeft, offsetHorizontal), r: optionToInt(opts.offsetRight, offsetHorizontal) }; diff --git a/dist/echo.min.js b/dist/echo.min.js index 70035f4..d007381 100644 --- a/dist/echo.min.js +++ b/dist/echo.min.js @@ -1,2 +1,2 @@ /*! Echo v1.5.0 | (c) 2014 @toddmotto | MIT license | github.com/toddmotto/echo */ -window.Echo=function(a,b){"use strict";var c,d,e,f,g=[],h=[],i=function(){},j=function(a,b){var c=a.getBoundingClientRect();return c.right>=b.l&&c.bottom>=b.t&&c.left<=b.r&&c.top<=b.b},k=function(){var a,d,e,k,l=g.length;if(k={l:0-c.l,t:0-c.t,b:(window.innerHeight||b.documentElement.clientHeight)+c.b,r:(window.innerWidth||b.documentElement.clientWidth)+c.r},l>0)for(d=0;l>d;d++)e=g[d],e&&j(e,k)&&(f&&(e.setAttribute("data-echo-placeholder",e.src),h.push(e)),e.src=e.getAttribute("data-echo"),i(e,"load"),g.splice(d,1),l=g.length,d--);if(a=h.length,a>0)for(d=0;a>d;d++)e=h[d],e&&!j(e,k)&&(e.src=e.getAttribute("data-echo-placeholder"),i(e,"unload"),h.splice(d,1),a=h.length,d--,g.push(e));0===a&&0===l&&n()},l=function(){clearTimeout(e),e=setTimeout(k,d)},m=function(e){function j(a,b){return parseInt(a||b,10)}var m=b.querySelectorAll("img[data-echo]");e=e||{};var n=e.offset||0,o=e.offsetVertical||n,p=e.offsetHorizontal||n;c={t:j(e.offsetTop,o),b:j(e.offsetBot,o),l:j(e.offsetLeft,p),r:j(e.offsetRight,p)},d=j(e.throttle,250),f=!!e.unload,i=e.callback||i,g=[],h=[];for(var q=0;q=b.l&&c.bottom>=b.t&&c.left<=b.r&&c.top<=b.b},k=function(){var a,d,e,k,l=g.length;if(k={l:0-c.l,t:0-c.t,b:(window.innerHeight||b.documentElement.clientHeight)+c.b,r:(window.innerWidth||b.documentElement.clientWidth)+c.r},l>0)for(d=0;l>d;d++)e=g[d],e&&j(e,k)&&(f&&(e.setAttribute("data-echo-placeholder",e.src),h.push(e)),e.src=e.getAttribute("data-echo"),i(e,"load"),g.splice(d,1),l=g.length,d--);if(a=h.length,a>0)for(d=0;a>d;d++)e=h[d],e&&!j(e,k)&&(e.src=e.getAttribute("data-echo-placeholder"),i(e,"unload"),h.splice(d,1),a=h.length,d--,g.push(e));0===a&&0===l&&n()},l=function(){clearTimeout(e),e=setTimeout(k,d)},m=function(e){function j(a,b){return parseInt(a||b,10)}var m=b.querySelectorAll("img[data-echo]");e=e||{};var n=e.offset||0,o=e.offsetVertical||n,p=e.offsetHorizontal||n;c={t:j(e.offsetTop,o),b:j(e.offsetBottom,o),l:j(e.offsetLeft,p),r:j(e.offsetRight,p)},d=j(e.throttle,250),f=!!e.unload,i=e.callback||i,g=[],h=[];for(var q=0;q