Rev 14197 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14197 | Rev 14734 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | (function webpackUniversalModuleDefinition(root, factory) { |
1 | (function webpackUniversalModuleDefinition(root, factory) { |
2 |
|
2 | if(typeof exports === 'object' && typeof module === 'object') |
3 |
|
3 | module.exports = factory(require("./foundation.core"), require("jquery")); |
4 |
|
4 | else if(typeof define === 'function' && define.amd) |
5 |
|
5 | define(["./foundation.core", "jquery"], factory); |
6 |
|
6 | else if(typeof exports === 'object') |
7 |
|
7 | exports["foundation.util.mediaQuery"] = factory(require("./foundation.core"), require("jquery")); |
8 |
|
8 | else |
9 |
|
9 | root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]); |
10 | })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { |
10 | })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) { |
11 | return /******/ (function(modules) { // webpackBootstrap |
11 | return /******/ (function(modules) { // webpackBootstrap |
12 | /******/ |
12 | /******/ // The module cache |
13 | /******/ |
13 | /******/ var installedModules = {}; |
14 | /******/ |
14 | /******/ |
15 | /******/ |
15 | /******/ // The require function |
16 | /******/ |
16 | /******/ function __webpack_require__(moduleId) { |
17 | /******/ |
17 | /******/ |
18 | /******/ |
18 | /******/ // Check if module is in cache |
19 | /******/ |
19 | /******/ if(installedModules[moduleId]) { |
20 | /******/ |
20 | /******/ return installedModules[moduleId].exports; |
21 | /******/ |
21 | /******/ } |
22 | /******/ |
22 | /******/ // Create a new module (and put it into the cache) |
23 | /******/ |
23 | /******/ var module = installedModules[moduleId] = { |
24 | /******/ |
24 | /******/ i: moduleId, |
25 | /******/ |
25 | /******/ l: false, |
26 | /******/ |
26 | /******/ exports: {} |
27 | /******/ |
27 | /******/ }; |
28 | /******/ |
28 | /******/ |
29 | /******/ |
29 | /******/ // Execute the module function |
30 | /******/ |
30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
31 | /******/ |
31 | /******/ |
32 | /******/ |
32 | /******/ // Flag the module as loaded |
33 | /******/ |
33 | /******/ module.l = true; |
34 | /******/ |
34 | /******/ |
35 | /******/ |
35 | /******/ // Return the exports of the module |
36 | /******/ |
36 | /******/ return module.exports; |
37 | /******/ |
37 | /******/ } |
38 | /******/ |
38 | /******/ |
39 | /******/ |
39 | /******/ |
40 | /******/ |
40 | /******/ // expose the modules object (__webpack_modules__) |
41 | /******/ |
41 | /******/ __webpack_require__.m = modules; |
42 | /******/ |
42 | /******/ |
43 | /******/ |
43 | /******/ // expose the module cache |
44 | /******/ |
44 | /******/ __webpack_require__.c = installedModules; |
45 | /******/ |
45 | /******/ |
46 | /******/ |
46 | /******/ // define getter function for harmony exports |
47 | /******/ |
47 | /******/ __webpack_require__.d = function(exports, name, getter) { |
48 | /******/ |
48 | /******/ if(!__webpack_require__.o(exports, name)) { |
49 | /******/ |
49 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
50 | /******/ |
50 | /******/ } |
51 | /******/ |
51 | /******/ }; |
52 | /******/ |
52 | /******/ |
53 | /******/ |
53 | /******/ // define __esModule on exports |
54 | /******/ |
54 | /******/ __webpack_require__.r = function(exports) { |
55 | /******/ |
55 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
56 | /******/ |
56 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
57 | /******/ |
57 | /******/ } |
58 | /******/ |
58 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
59 | /******/ |
59 | /******/ }; |
60 | /******/ |
60 | /******/ |
61 | /******/ |
61 | /******/ // create a fake namespace object |
62 | /******/ |
62 | /******/ // mode & 1: value is a module id, require it |
63 | /******/ |
63 | /******/ // mode & 2: merge all properties of value into the ns |
64 | /******/ |
64 | /******/ // mode & 4: return value when already ns object |
65 | /******/ |
65 | /******/ // mode & 8|1: behave like require |
66 | /******/ |
66 | /******/ __webpack_require__.t = function(value, mode) { |
67 | /******/ |
67 | /******/ if(mode & 1) value = __webpack_require__(value); |
68 | /******/ |
68 | /******/ if(mode & 8) return value; |
69 | /******/ |
69 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
70 | /******/ |
70 | /******/ var ns = Object.create(null); |
71 | /******/ |
71 | /******/ __webpack_require__.r(ns); |
72 | /******/ |
72 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
73 | /******/ |
73 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
74 | /******/ |
74 | /******/ return ns; |
75 | /******/ |
75 | /******/ }; |
76 | /******/ |
76 | /******/ |
77 | /******/ |
77 | /******/ // getDefaultExport function for compatibility with non-harmony modules |
78 | /******/ |
78 | /******/ __webpack_require__.n = function(module) { |
79 | /******/ |
79 | /******/ var getter = module && module.__esModule ? |
80 | /******/ |
80 | /******/ function getDefault() { return module['default']; } : |
81 | /******/ |
81 | /******/ function getModuleExports() { return module; }; |
82 | /******/ |
82 | /******/ __webpack_require__.d(getter, 'a', getter); |
83 | /******/ |
83 | /******/ return getter; |
84 | /******/ |
84 | /******/ }; |
85 | /******/ |
85 | /******/ |
86 | /******/ |
86 | /******/ // Object.prototype.hasOwnProperty.call |
87 | /******/ |
87 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
88 | /******/ |
88 | /******/ |
89 | /******/ |
89 | /******/ // __webpack_public_path__ |
90 | /******/ |
90 | /******/ __webpack_require__.p = ""; |
91 | /******/ |
91 | /******/ |
92 | /******/ |
92 | /******/ |
93 | /******/ |
93 | /******/ // Load entry module and return exports |
94 | /******/ |
94 | /******/ return __webpack_require__(__webpack_require__.s = 24); |
95 | /******/ }) |
95 | /******/ }) |
96 | /************************************************************************/ |
96 | /************************************************************************/ |
97 | /******/ ({ |
97 | /******/ ({ |
98 | 98 | ||
99 | /***/ "./foundation.core": |
99 | /***/ "./foundation.core": |
Line 146... | Line 146... | ||
146 | /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); |
146 | /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery"); |
147 | /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); |
147 | /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); |
148 | 148 | ||
149 | 149 | ||
150 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } |
150 | function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } |
- | 151 | ||
- | 152 | function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } |
|
- | 153 | ||
- | 154 | function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } |
|
- | 155 | ||
- | 156 | function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } |
|
- | 157 | ||
- | 158 | function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } |
|
151 | 159 | ||
152 | // Default set of media queries |
160 | // Default set of media queries |
153 | 161 | ||
154 | var defaultQueries = { |
162 | var defaultQueries = { |
155 | 'default': 'only screen', |
163 | 'default': 'only screen', |
156 | landscape: 'only screen and (orientation: landscape)', |
164 | landscape: 'only screen and (orientation: landscape)', |
157 | portrait: 'only screen and (orientation: portrait)', |
165 | portrait: 'only screen and (orientation: portrait)', |
158 | retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)' |
166 | retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)' |
159 | }; // matchMedia() polyfill - Test a CSS media type/query in JS. |
167 | }; // matchMedia() polyfill - Test a CSS media type/query in JS. |
160 | // Authors & copyright |
168 | // Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license |
161 | 169 | ||
162 | /* eslint-disable */ |
170 | /* eslint-disable */ |
163 | 171 | ||
164 | window.matchMedia || (window.matchMedia = function () { |
172 | window.matchMedia || (window.matchMedia = function () { |
165 | "use strict"; // For browsers that support matchMedium api such as IE 9 and webkit |
173 | "use strict"; // For browsers that support matchMedium api such as IE 9 and webkit |
Line 188... | Line 196... | ||
188 | if (style.styleSheet) { |
196 | if (style.styleSheet) { |
189 | style.styleSheet.cssText = text; |
197 | style.styleSheet.cssText = text; |
190 | } else { |
198 | } else { |
191 | style.textContent = text; |
199 | style.textContent = text; |
192 | } // Test if media query is true or false |
200 | } // Test if media query is true or false |
193 | 201 | ||
194 | 202 | ||
195 | return info.width === '1px'; |
203 | return info.width === '1px'; |
196 | } |
204 | } |
197 | }; |
205 | }; |
198 | } |
206 | } |
199 | 207 | ||
200 | return function (media) { |
208 | return function (media) { |
201 | return { |
209 | return { |
202 | matches: styleMedia.matchMedium(media || 'all'), |
210 | matches: styleMedia.matchMedium(media || 'all'), |
203 | media: media || 'all' |
211 | media: media || 'all' |
204 | }; |
212 | }; |
205 | }; |
213 | }; |
206 | }()); |
214 | }()); |
207 | /* eslint-enable */ |
215 | /* eslint-enable */ |
208 | 216 | ||
209 | var MediaQuery = { |
217 | var MediaQuery = { |
210 | queries: [], |
218 | queries: [], |
211 | current: '', |
219 | current: '', |
212 | 220 | ||
213 | /** |
221 | /** |
214 | * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. |
222 | * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher. |
215 | * @function |
223 | * @function |
216 | * @private |
224 | * @private |
217 | */ |
225 | */ |
218 | _init: function _init() { |
226 | _init: function _init() { |
- | 227 | // make sure the initialization is only done once when calling _init() several times |
|
- | 228 | if (this.isInitialized === true) { |
|
- | 229 | return; |
|
- | 230 | } else { |
|
- | 231 | this.isInitialized = true; |
|
- | 232 | } |
|
- | 233 | ||
219 | var self = this; |
234 | var self = this; |
220 | var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq'); |
235 | var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq'); |
221 | 236 | ||
222 | if (!$meta.length) { |
237 | if (!$meta.length) { |
223 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq">').appendTo(document.head); |
238 | jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq">').appendTo(document.head); |
224 | } |
239 | } |
225 | 240 | ||
226 | var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family'); |
241 | var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family'); |
227 | var namedQueries; |
242 | var namedQueries; |
228 | namedQueries = parseStyleToObject(extractedStyles); |
243 | namedQueries = parseStyleToObject(extractedStyles); |
- | 244 | self.queries = []; // reset |
|
229 | 245 | ||
230 | for (var key in namedQueries) { |
246 | for (var key in namedQueries) { |
231 | if (namedQueries.hasOwnProperty(key)) { |
247 | if (namedQueries.hasOwnProperty(key)) { |
232 | self.queries.push({ |
248 | self.queries.push({ |
233 | name: key, |
249 | name: key, |
Line 237... | Line 253... | ||
237 | } |
253 | } |
238 | 254 | ||
239 | this.current = this._getCurrentSize(); |
255 | this.current = this._getCurrentSize(); |
240 | 256 | ||
241 | this._watcher(); |
257 | this._watcher(); |
- | 258 | }, |
|
- | 259 | ||
- | 260 | /** |
|
- | 261 | * Reinitializes the media query helper. |
|
- | 262 | * Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization. |
|
- | 263 | * @function |
|
- | 264 | * @private |
|
- | 265 | */ |
|
- | 266 | _reInit: function _reInit() { |
|
- | 267 | this.isInitialized = false; |
|
- | 268 | ||
- | 269 | this._init(); |
|
242 | }, |
270 | }, |
243 | 271 | ||
244 | /** |
272 | /** |
245 | * Checks if the screen is at least as wide as a breakpoint. |
273 | * Checks if the screen is at least as wide as a breakpoint. |
246 | * @function |
274 | * @function |
Line 250... | Line 278... | ||
250 | atLeast: function atLeast(size) { |
278 | atLeast: function atLeast(size) { |
251 | var query = this.get(size); |
279 | var query = this.get(size); |
252 | 280 | ||
253 | if (query) { |
281 | if (query) { |
254 | return window.matchMedia(query).matches; |
282 | return window.matchMedia(query).matches; |
255 | } |
283 | } |
256 | 284 | ||
257 | return false; |
285 | return false; |
- | 286 | }, |
|
- | 287 | ||
- | 288 | /** |
|
- | 289 | * Checks if the screen is within the given breakpoint. |
|
- | 290 | * If smaller than the breakpoint of larger than its upper limit it returns false. |
|
- | 291 | * @function |
|
- | 292 | * @param {String} size - Name of the breakpoint to check. |
|
- | 293 | * @returns {Boolean} `true` if the breakpoint matches, `false` otherwise. |
|
- | 294 | */ |
|
- | 295 | only: function only(size) { |
|
- | 296 | return size === this._getCurrentSize(); |
|
- | 297 | }, |
|
- | 298 | ||
- | 299 | /** |
|
- | 300 | * Checks if the screen is within a breakpoint or smaller. |
|
- | 301 | * @function |
|
- | 302 | * @param {String} size - Name of the breakpoint to check. |
|
- | 303 | * @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger. |
|
- | 304 | */ |
|
- | 305 | upTo: function upTo(size) { |
|
- | 306 | var nextSize = this.next(size); // If the next breakpoint does not match, the screen is smaller than |
|
- | 307 | // the upper limit of this breakpoint. |
|
- | 308 | ||
- | 309 | if (nextSize) { |
|
- | 310 | return !this.atLeast(nextSize); |
|
- | 311 | } // If there is no next breakpoint, the "size" breakpoint does not have |
|
- | 312 | // an upper limit and the screen will always be within it or smaller. |
|
- | 313 | ||
- | 314 | ||
- | 315 | return true; |
|
258 | }, |
316 | }, |
259 | 317 | ||
260 | /** |
318 | /** |
261 | * Checks if the screen matches to a breakpoint. |
319 | * Checks if the screen matches to a breakpoint. |
262 | * @function |
320 | * @function |
263 | * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. |
321 | * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method. |
264 | * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. |
322 | * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not. |
265 | */ |
323 | */ |
266 | is: function is(size) { |
324 | is: function is(size) { |
267 |
|
325 | var parts = size.trim().split(' ').filter(function (p) { |
- | 326 | return !!p.length; |
|
- | 327 | }); |
|
- | 328 | ||
- | 329 | var _parts = _slicedToArray(parts, 2), |
|
- | 330 | bpSize = _parts[0], |
|
- | 331 | _parts$ = _parts[1], |
|
- | 332 | bpModifier = _parts$ === void 0 ? '' : _parts$; // Only the breakpont |
|
- | 333 | ||
268 | 334 | ||
269 | if ( |
335 | if (bpModifier === 'only') { |
270 |
|
336 | return this.only(bpSize); |
271 | } |
337 | } // At least the breakpoint (included) |
- | 338 | ||
- | 339 | ||
- | 340 | if (!bpModifier || bpModifier === 'up') { |
|
272 | return this.atLeast( |
341 | return this.atLeast(bpSize); |
- | 342 | } // Up to the breakpoint (included) |
|
- | 343 | ||
- | 344 | ||
- | 345 | if (bpModifier === 'down') { |
|
- | 346 | return this.upTo(bpSize); |
|
273 | } |
347 | } |
274 | 348 | ||
275 | return false; |
- | |
- | 349 | throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n ")); |
|
276 | }, |
350 | }, |
277 | 351 | ||
278 | /** |
352 | /** |
279 | * Gets the media query of a breakpoint. |
353 | * Gets the media query of a breakpoint. |
280 | * @function |
354 | * @function |
Line 288... | Line 362... | ||
288 | if (size === query.name) return query.value; |
362 | if (size === query.name) return query.value; |
289 | } |
363 | } |
290 | } |
364 | } |
291 | 365 | ||
292 | return null; |
366 | return null; |
- | 367 | }, |
|
- | 368 | ||
- | 369 | /** |
|
- | 370 | * Get the breakpoint following the given breakpoint. |
|
- | 371 | * @function |
|
- | 372 | * @param {String} size - Name of the breakpoint. |
|
- | 373 | * @returns {String|null} - The name of the following breakpoint, or `null` if the passed breakpoint was the last one. |
|
- | 374 | */ |
|
- | 375 | next: function next(size) { |
|
- | 376 | var _this = this; |
|
- | 377 | ||
- | 378 | var queryIndex = this.queries.findIndex(function (q) { |
|
- | 379 | return _this._getQueryName(q) === size; |
|
- | 380 | }); |
|
- | 381 | ||
- | 382 | if (queryIndex === -1) { |
|
- | 383 | throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n ")); |
|
- | 384 | } |
|
- | 385 | ||
- | 386 | var nextQuery = this.queries[queryIndex + 1]; |
|
- | 387 | return nextQuery ? nextQuery.name : null; |
|
- | 388 | }, |
|
- | 389 | ||
- | 390 | /** |
|
- | 391 | * Returns the name of the breakpoint related to the given value. |
|
- | 392 | * @function |
|
- | 393 | * @private |
|
- | 394 | * @param {String|Object} value - Breakpoint name or query object. |
|
- | 395 | * @returns {String} Name of the breakpoint. |
|
- | 396 | */ |
|
- | 397 | _getQueryName: function _getQueryName(value) { |
|
- | 398 | if (typeof value === 'string') return value; |
|
- | 399 | if (_typeof(value) === 'object') return value.name; |
|
- | 400 | throw new TypeError("\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"".concat(value, "\" (").concat(_typeof(value), ")\n ")); |
|
293 | }, |
401 | }, |
294 | 402 | ||
295 | /** |
403 | /** |
296 | * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). |
404 | * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one). |
297 | * @function |
405 | * @function |
Line 307... | Line 415... | ||
307 | if (window.matchMedia(query.value).matches) { |
415 | if (window.matchMedia(query.value).matches) { |
308 | matched = query; |
416 | matched = query; |
309 | } |
417 | } |
310 | } |
418 | } |
311 | 419 | ||
312 | if (_typeof(matched) === 'object') { |
- | |
313 |
|
420 | return matched && this._getQueryName(matched); |
314 | } else { |
- | |
315 | return matched; |
- | |
316 | } |
- | |
317 | }, |
421 | }, |
318 | 422 | ||
319 | /** |
423 | /** |
320 | * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. |
424 | * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes. |
321 | * @function |
425 | * @function |
322 | * @private |
426 | * @private |
323 | */ |
427 | */ |
324 | _watcher: function _watcher() { |
428 | _watcher: function _watcher() { |
325 | var |
429 | var _this2 = this; |
326 | 430 | ||
327 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () { |
431 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () { |
328 | var newSize = |
432 | var newSize = _this2._getCurrentSize(), |
329 | currentSize = |
433 | currentSize = _this2.current; |
330 | 434 | ||
331 | if (newSize !== currentSize) { |
435 | if (newSize !== currentSize) { |
332 | // Change the current media query |
436 | // Change the current media query |
333 |
|
437 | _this2.current = newSize; // Broadcast the media query change on the window |
334 | 438 | ||
335 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); |
439 | jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]); |
336 | } |
440 | } |
337 | }); |
441 | }); |
338 | } |
442 | } |
Line 382... | Line 486... | ||
382 | !*** multi ./js/entries/plugins/foundation.util.mediaQuery.js ***! |
486 | !*** multi ./js/entries/plugins/foundation.util.mediaQuery.js ***! |
383 | \****************************************************************/ |
487 | \****************************************************************/ |
384 | /*! no static exports found */ |
488 | /*! no static exports found */ |
385 | /***/ (function(module, exports, __webpack_require__) { |
489 | /***/ (function(module, exports, __webpack_require__) { |
386 | 490 | ||
387 | module.exports = __webpack_require__(/*! / |
491 | module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/foundation-sites/js/entries/plugins/foundation.util.mediaQuery.js */"./js/entries/plugins/foundation.util.mediaQuery.js"); |
388 | 492 | ||
389 | 493 | ||
390 | /***/ }), |
494 | /***/ }), |
391 | 495 | ||
392 | /***/ "jquery": |
496 | /***/ "jquery": |