|
3 | 3 | * @link http://responsejs.com
|
4 | 4 | * @author Ryan Van Etten (c) 2011-2012
|
5 | 5 | * @license MIT
|
6 |
| - * @version 0.5.1 |
| 6 | + * @version 0.5.2 |
7 | 7 | * @requires jQuery 1.7+
|
8 | 8 | * -or- Jeesh (ender.no.de/#jeesh)
|
9 | 9 | * -or- Zepto 0.8+ (zeptojs.com)
|
10 | 10 | */
|
11 | 11 |
|
12 |
| -;this.Response = (function( window, undef ) {// this === window in the global scope |
| 12 | +;this.Response = (function( window ) {// this === window in the global scope |
13 | 13 |
|
14 | 14 | // Combine local vars/funcs into one statement:
|
15 | 15 |
|
|
23 | 23 | , ready = $.domReady || $
|
24 | 24 | , $win = $(window) // cache selector
|
25 | 25 | , slice = [].slice // jsperf.com/arrayify-slice/2
|
26 |
| - , screen = window.screen // local for better minification and scope traversal |
27 |
| - , max = Math.max // local for better minification and scope traversal |
28 |
| - , isFinite = window.isFinite // local for better minification and scope traversal |
| 26 | + , screen = window.screen // local for better minification |
| 27 | + , max = Math.max // local for better minification |
29 | 28 |
|
30 | 29 | // these are defined later
|
31 | 30 | , Elemset, band, wave, device = {}
|
|
62 | 61 | return {};
|
63 | 62 | }
|
64 | 63 |
|
65 |
| - // Use isArray when available. With inspiration from |
| 64 | + // Use native isArray when available. With inspiration from |
66 | 65 | // github.com/ded/valentine and github.com/documentcloud/underscore
|
67 |
| - , isArray = Array.isArray || function(ukn) { |
| 66 | + , isArray = Array.isArray || $.isArray || function(ukn) { |
68 | 67 | return ukn instanceof Array;
|
69 | 68 | }
|
70 | 69 |
|
|
98 | 97 | return docElem.clientWidth;
|
99 | 98 | }
|
100 | 99 |
|
101 |
| - function viewportH() { |
| 100 | + function viewportH() { |
102 | 101 | return docElem.clientHeight;
|
103 | 102 | }
|
104 | 103 |
|
|
265 | 264 | return (!s || typeof s === 'string' ? s // unchanged
|
266 | 265 | : 'true' === s ? true // convert "true" to true
|
267 | 266 | : 'false' === s ? false // convert "false" to false
|
268 |
| - : 'undefined' === s ? undef // convert "undefined" to undefined |
| 267 | + : 'undefined' === s ? n // convert "undefined" to undefined |
269 | 268 | : 'null' === s ? null // convert "null" to null
|
270 | 269 | : isFinite((n = parseFloat(s))) ? n // convert "1000" to 1000
|
271 | 270 | : s // unchanged
|
|
514 | 513 |
|
515 | 514 | /**
|
516 | 515 | * Response.overflowX() Get the number of pixels that the document width exceeds viewport width.
|
517 |
| - * |
| 516 | + * may be @depreciated in near future @link github.com/ryanve/response.js/issues/6 |
518 | 517 | * @return integer pixel amount that horizontal content overflows viewport (or 0 if there's no overflow).
|
519 | 518 | */
|
520 | 519 |
|
|
526 | 525 |
|
527 | 526 | /**
|
528 | 527 | * Response.overflowY() Get the number of pixels that the document height exceeds viewport height.
|
529 |
| - * |
| 528 | + * may be @depreciated in near future @link github.com/ryanve/response.js/issues/6 |
530 | 529 | * @return integer pixel amount that vertical content overflows the viewport (or 0 if there's no overflow).
|
531 | 530 | */
|
532 | 531 |
|
|
837 | 836 | , dynamic: 0 // boolean defined @ configure()
|
838 | 837 | , values: [] // array available values
|
839 | 838 | , fn: 0 // callback the test fn, defined @ configure()
|
840 |
| - , verge: undef // integer defaults to Math.min(screenMax, 500) |
| 839 | + , verge: null // integer defaults to Math.min(screenMax, 500) |
841 | 840 | , newValue: 0
|
842 | 841 | , currValue: 1
|
843 | 842 | , aka: 0
|
|
946 | 945 |
|
947 | 946 | // Use the breakpoints array to create array of data keys:
|
948 | 947 | context.keys = affix(context.breakpoints, context.prefix);
|
949 |
| - context.aka = undef; // Reset to undef just in case a value was merged in. |
| 948 | + context.aka = false; // Reset to false just in case a value was merged in. |
950 | 949 |
|
951 | 950 | if (aliases) {// There may be one of more aliases:
|
952 | 951 | aliasKeys = [];
|
|
1228 | 1227 | , store: store
|
1229 | 1228 | , access: access
|
1230 | 1229 | , target: target
|
1231 |
| - , overflowX: overflowX |
| 1230 | + , overflowX: overflowX // github.com/ryanve/response.js/issues/6 |
1232 | 1231 | , overflowY: overflowY
|
1233 | 1232 | , object: objectCreate
|
1234 | 1233 | , crossover: crossover
|
|
0 commit comments