Skip to content

Commit

Permalink
Clean up and update horizontal.html + update export + build
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinhocde committed Jun 3, 2020
1 parent 67b2361 commit bf6d73a
Show file tree
Hide file tree
Showing 15 changed files with 115 additions and 4,685 deletions.
3 changes: 2 additions & 1 deletion dist/locomotive-scroll.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ html.has-scroll-dragging {
[data-scroll-direction="horizontal"] [data-scroll-section] {
display: inline-block;
vertical-align: top;
white-space: nowrap; }
white-space: nowrap;
height: 100%; }

.c-scrollbar {
position: absolute;
Expand Down
30 changes: 15 additions & 15 deletions dist/locomotive-scroll.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2812,11 +2812,11 @@ var _default$2 = /*#__PURE__*/function (_Core) {
return _default;
}(_default);

var _default$3 = /*#__PURE__*/function () {
function _default() {
var Smooth = /*#__PURE__*/function () {
function Smooth() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

_classCallCheck(this, _default);
_classCallCheck(this, Smooth);

this.options = options; // Override default options with given ones

Expand All @@ -2825,13 +2825,13 @@ var _default$3 = /*#__PURE__*/function () {
if (options.smartphone) Object.assign(this.smartphone, options.smartphone);
this.tablet = defaults.tablet;
if (options.tablet) Object.assign(this.tablet, options.tablet);
if (!this.smooth && this.direction == 'horizontal') console.warn('🚨 `smooth` & `horizontal` direction are not yet compatible');
if (!this.tablet.smooth && this.tablet.direction == 'horizontal') console.warn('🚨 `smooth` & `horizontal` direction are not yet compatible (tablet)');
if (!this.smartphone.smooth && this.smartphone.direction == 'horizontal') console.warn('🚨 `smooth` & `horizontal` direction are not yet compatible (smartphone)');
if (!this.smooth && this.direction == 'horizontal') console.warn('🚨 `smooth:false` & `horizontal` direction are not yet compatible');
if (!this.tablet.smooth && this.tablet.direction == 'horizontal') console.warn('🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)');
if (!this.smartphone.smooth && this.smartphone.direction == 'horizontal') console.warn('🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)');
this.init();
}

_createClass(_default, [{
_createClass(Smooth, [{
key: "init",
value: function init() {
this.options.isMobile = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 || window.innerWidth < this.tablet.breakpoint;
Expand Down Expand Up @@ -2895,14 +2895,14 @@ var _default$3 = /*#__PURE__*/function () {
}
}]);

return _default;
return Smooth;
}();

var LocomotiveNativeScroll = /*#__PURE__*/function () {
function LocomotiveNativeScroll() {
var Native = /*#__PURE__*/function () {
function Native() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

_classCallCheck(this, LocomotiveNativeScroll);
_classCallCheck(this, Native);

this.options = options; // Override default options with given ones

Expand All @@ -2914,7 +2914,7 @@ var LocomotiveNativeScroll = /*#__PURE__*/function () {
this.init();
}

_createClass(LocomotiveNativeScroll, [{
_createClass(Native, [{
key: "init",
value: function init() {
this.scroll = new _default$1(this.options);
Expand Down Expand Up @@ -2970,8 +2970,8 @@ var LocomotiveNativeScroll = /*#__PURE__*/function () {
}
}]);

return LocomotiveNativeScroll;
return Native;
}();

export default _default$3;
export { LocomotiveNativeScroll };
export default Smooth;
export { Native, Smooth };
31 changes: 16 additions & 15 deletions dist/locomotive-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -2818,11 +2818,11 @@
return _default;
}(_default);

var _default$3 = /*#__PURE__*/function () {
function _default() {
var Smooth = /*#__PURE__*/function () {
function Smooth() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

_classCallCheck(this, _default);
_classCallCheck(this, Smooth);

this.options = options; // Override default options with given ones

Expand All @@ -2831,13 +2831,13 @@
if (options.smartphone) Object.assign(this.smartphone, options.smartphone);
this.tablet = defaults.tablet;
if (options.tablet) Object.assign(this.tablet, options.tablet);
if (!this.smooth && this.direction == 'horizontal') console.warn('🚨 `smooth` & `horizontal` direction are not yet compatible');
if (!this.tablet.smooth && this.tablet.direction == 'horizontal') console.warn('🚨 `smooth` & `horizontal` direction are not yet compatible (tablet)');
if (!this.smartphone.smooth && this.smartphone.direction == 'horizontal') console.warn('🚨 `smooth` & `horizontal` direction are not yet compatible (smartphone)');
if (!this.smooth && this.direction == 'horizontal') console.warn('🚨 `smooth:false` & `horizontal` direction are not yet compatible');
if (!this.tablet.smooth && this.tablet.direction == 'horizontal') console.warn('🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)');
if (!this.smartphone.smooth && this.smartphone.direction == 'horizontal') console.warn('🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)');
this.init();
}

_createClass(_default, [{
_createClass(Smooth, [{
key: "init",
value: function init() {
this.options.isMobile = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 || window.innerWidth < this.tablet.breakpoint;
Expand Down Expand Up @@ -2901,14 +2901,14 @@
}
}]);

return _default;
return Smooth;
}();

var LocomotiveNativeScroll = /*#__PURE__*/function () {
function LocomotiveNativeScroll() {
var Native = /*#__PURE__*/function () {
function Native() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

_classCallCheck(this, LocomotiveNativeScroll);
_classCallCheck(this, Native);

this.options = options; // Override default options with given ones

Expand All @@ -2920,7 +2920,7 @@
this.init();
}

_createClass(LocomotiveNativeScroll, [{
_createClass(Native, [{
key: "init",
value: function init() {
this.scroll = new _default$1(this.options);
Expand Down Expand Up @@ -2976,11 +2976,12 @@
}
}]);

return LocomotiveNativeScroll;
return Native;
}();

exports.LocomotiveNativeScroll = LocomotiveNativeScroll;
exports.default = _default$3;
exports.Native = Native;
exports.Smooth = Smooth;
exports.default = Smooth;

Object.defineProperty(exports, '__esModule', { value: true });

Expand Down
2 changes: 1 addition & 1 deletion dist/locomotive-scroll.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/locomotive-scroll.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit bf6d73a

Please sign in to comment.