Skip to content

Commit

Permalink
Merge pull request #716 from MrSlide/master
Browse files Browse the repository at this point in the history
Fixed issue when using with SSR apps due to window not being defined
  • Loading branch information
meandmax authored Mar 10, 2018
2 parents d5f66bd + 3cca8bd commit 88236fe
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 252 deletions.
250 changes: 126 additions & 124 deletions dist/jquery.lory.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(typeof self !== 'undefined' ? self : this, function() {
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
Expand Down Expand Up @@ -43,6 +43,9 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
Expand Down Expand Up @@ -70,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 8);
/******/ return __webpack_require__(__webpack_require__.s = 7);
/******/ })
/************************************************************************/
/******/ ([
Expand Down Expand Up @@ -115,19 +118,19 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument

exports.lory = lory;

var _detectPrefixes = __webpack_require__(2);
var _detectPrefixes = __webpack_require__(3);

var _detectPrefixes2 = _interopRequireDefault(_detectPrefixes);

var _detectSupportsPassive = __webpack_require__(3);
var _detectSupportsPassive = __webpack_require__(4);

var _detectSupportsPassive2 = _interopRequireDefault(_detectSupportsPassive);

var _dispatchEvent = __webpack_require__(4);
var _dispatchEvent = __webpack_require__(5);

var _dispatchEvent2 = _interopRequireDefault(_dispatchEvent);

var _defaults = __webpack_require__(6);
var _defaults = __webpack_require__(2);

var _defaults2 = _interopRequireDefault(_defaults);

Expand Down Expand Up @@ -706,6 +709,118 @@ function lory(slider, opts) {
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
/**
* slides scrolled at once
* @slidesToScroll {Number}
*/
slidesToScroll: 1,

/**
* time in milliseconds for the animation of a valid slide attempt
* @slideSpeed {Number}
*/
slideSpeed: 300,

/**
* time in milliseconds for the animation of the rewind after the last slide
* @rewindSpeed {Number}
*/
rewindSpeed: 600,

/**
* time for the snapBack of the slider if the slide attempt was not valid
* @snapBackSpeed {Number}
*/
snapBackSpeed: 200,

/**
* Basic easing functions: https://developer.mozilla.org/de/docs/Web/CSS/transition-timing-function
* cubic bezier easing functions: http://easings.net/de
* @ease {String}
*/
ease: 'ease',

/**
* if slider reached the last slide, with next click the slider goes back to the startindex.
* use infinite or rewind, not both
* @rewind {Boolean}
*/
rewind: false,

/**
* number of visible slides or false
* use infinite or rewind, not both
* @infinite {number}
*/
infinite: false,

/**
* the slide index to show when the slider is initialized.
* @initialIndex {number}
*/
initialIndex: 0,

/**
* class name for slider frame
* @classNameFrame {string}
*/
classNameFrame: 'js_frame',

/**
* class name for slides container
* @classNameSlideContainer {string}
*/
classNameSlideContainer: 'js_slides',

/**
* class name for slider prev control
* @classNamePrevCtrl {string}
*/
classNamePrevCtrl: 'js_prev',

/**
* class name for slider next control
* @classNameNextCtrl {string}
*/
classNameNextCtrl: 'js_next',

/**
* class name for current active slide
* if emptyString then no class is set
* @classNameActiveSlide {string}
*/
classNameActiveSlide: 'active',

/**
* enables mouse events for swiping on desktop devices
* @enableMouseEvents {boolean}
*/
enableMouseEvents: false,

/**
* window instance
* @window {object}
*/
window: typeof window !== 'undefined' ? window : null,

/**
* If false, slides lory to the first slide on window resize.
* @rewindOnResize {boolean}
*/
rewindOnResize: true
};

/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(global) {

Expand Down Expand Up @@ -766,7 +881,7 @@ function detectPrefixes() {
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 3 */
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand Down Expand Up @@ -794,7 +909,7 @@ function detectSupportsPassive() {
}

/***/ }),
/* 4 */
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand All @@ -805,7 +920,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = dispatchEvent;

var _customEvent = __webpack_require__(5);
var _customEvent = __webpack_require__(6);

var _customEvent2 = _interopRequireDefault(_customEvent);

Expand All @@ -829,7 +944,7 @@ function dispatchEvent(target, type, detail) {
}

/***/ }),
/* 5 */
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {
Expand Down Expand Up @@ -884,120 +999,7 @@ function CustomEvent (type, params) {
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))

/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
/**
* slides scrolled at once
* @slidesToScroll {Number}
*/
slidesToScroll: 1,

/**
* time in milliseconds for the animation of a valid slide attempt
* @slideSpeed {Number}
*/
slideSpeed: 300,

/**
* time in milliseconds for the animation of the rewind after the last slide
* @rewindSpeed {Number}
*/
rewindSpeed: 600,

/**
* time for the snapBack of the slider if the slide attempt was not valid
* @snapBackSpeed {Number}
*/
snapBackSpeed: 200,

/**
* Basic easing functions: https://developer.mozilla.org/de/docs/Web/CSS/transition-timing-function
* cubic bezier easing functions: http://easings.net/de
* @ease {String}
*/
ease: 'ease',

/**
* if slider reached the last slide, with next click the slider goes back to the startindex.
* use infinite or rewind, not both
* @rewind {Boolean}
*/
rewind: false,

/**
* number of visible slides or false
* use infinite or rewind, not both
* @infinite {number}
*/
infinite: false,

/**
* the slide index to show when the slider is initialized.
* @initialIndex {number}
*/
initialIndex: 0,

/**
* class name for slider frame
* @classNameFrame {string}
*/
classNameFrame: 'js_frame',

/**
* class name for slides container
* @classNameSlideContainer {string}
*/
classNameSlideContainer: 'js_slides',

/**
* class name for slider prev control
* @classNamePrevCtrl {string}
*/
classNamePrevCtrl: 'js_prev',

/**
* class name for slider next control
* @classNameNextCtrl {string}
*/
classNameNextCtrl: 'js_next',

/**
* class name for current active slide
* if emptyString then no class is set
* @classNameActiveSlide {string}
*/
classNameActiveSlide: 'active',

/**
* enables mouse events for swiping on desktop devices
* @enableMouseEvents {boolean}
*/
enableMouseEvents: false,

/**
* window instance
* @window {object}
*/
window: window,

/**
* If false, slides lory to the first slide on window resize.
* @rewindOnResize {boolean}
*/
rewindOnResize: true
};

/***/ }),
/* 7 */,
/* 8 */
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.lory.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jquery.lory.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 88236fe

Please sign in to comment.