Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Boulongne authored and thomasboulongne committed Jan 16, 2020
1 parent fc0d514 commit 6cf782e
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 8 deletions.
160 changes: 157 additions & 3 deletions dist/jquery.lory.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument

exports.lory = lory;

<<<<<<< refs/remotes/upstream/master
var _detectPrefixes = __webpack_require__(1);

var _detectPrefixes2 = _interopRequireDefault(_detectPrefixes);
Expand All @@ -97,6 +98,17 @@ var _detectSupportsPassive = __webpack_require__(2);
var _detectSupportsPassive2 = _interopRequireDefault(_detectSupportsPassive);

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

var _detectPrefixes2 = _interopRequireDefault(_detectPrefixes);

var _detectSupportsPassive = __webpack_require__(3);

var _detectSupportsPassive2 = _interopRequireDefault(_detectSupportsPassive);

var _dispatchEvent = __webpack_require__(4);
>>>>>>> Build

var _dispatchEvent2 = _interopRequireDefault(_dispatchEvent);

Expand Down Expand Up @@ -141,7 +153,8 @@ function lory(slider, opts) {
*/
function setActiveElement(slides, currentIndex) {
var _options = options,
classNameActiveSlide = _options.classNameActiveSlide;
classNameActiveSlide = _options.classNameActiveSlide,
infinite = _options.infinite;


slides.forEach(function (element, index) {
Expand All @@ -151,6 +164,12 @@ function lory(slider, opts) {
});

slides[currentIndex].classList.add(classNameActiveSlide);

if (infinite && currentIndex === slides.length - infinite * 2) {
slides[infinite - 1].classList.add(classNameActiveSlide);
} else if (currentIndex === infinite) {
slides[slides.length - infinite].classList.add(classNameActiveSlide);
}
}

/**
Expand Down Expand Up @@ -545,8 +564,8 @@ function lory(slider, opts) {
var delta = void 0;
var isScrolling = void 0;

function onTransitionEnd() {
if (transitionEndCallback) {
function onTransitionEnd(event) {
if (transitionEndCallback && event.target === slideContainer) {
transitionEndCallback();

transitionEndCallback = undefined;
Expand Down Expand Up @@ -705,7 +724,11 @@ function lory(slider, opts) {
/***/ (function(module, exports, __webpack_require__) {

"use strict";
<<<<<<< refs/remotes/upstream/master

=======
/* WEBPACK VAR INJECTION */(function(global) {
>>>>>>> Build

Object.defineProperty(exports, "__esModule", {
value: true
Expand Down Expand Up @@ -760,7 +783,11 @@ function detectPrefixes() {
}

/***/ }),
<<<<<<< refs/remotes/upstream/master
/* 2 */
=======
/* 3 */
>>>>>>> Build
/***/ (function(module, exports, __webpack_require__) {

"use strict";
Expand Down Expand Up @@ -788,7 +815,11 @@ function detectSupportsPassive() {
}

/***/ }),
<<<<<<< refs/remotes/upstream/master
/* 3 */
=======
/* 4 */
>>>>>>> Build
/***/ (function(module, exports, __webpack_require__) {

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

<<<<<<< refs/remotes/upstream/master
var _customEvent = __webpack_require__(4);
=======
var _customEvent = __webpack_require__(5);
>>>>>>> Build

var _customEvent2 = _interopRequireDefault(_customEvent);

Expand All @@ -823,7 +858,11 @@ function dispatchEvent(target, type, detail) {
}

/***/ }),
<<<<<<< refs/remotes/upstream/master
/* 4 */
=======
/* 5 */
>>>>>>> Build
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {
Expand Down Expand Up @@ -1017,6 +1056,121 @@ exports.default = {
};

/***/ }),
<<<<<<< refs/remotes/upstream/master
=======
/* 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: typeof window !== 'undefined' ? window : null,

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

/***/ }),
>>>>>>> Build
/* 7 */,
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
Expand Down
Loading

0 comments on commit 6cf782e

Please sign in to comment.