Skip to content

Commit

Permalink
4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hum-n committed Nov 17, 2020
1 parent a816758 commit 68235ee
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 91 deletions.
2 changes: 1 addition & 1 deletion dist/locomotive-scroll.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! locomotive-scroll v4.0.2 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
/*! locomotive-scroll v4.0.3 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
html.has-scroll-smooth {
overflow: hidden; }

Expand Down
2 changes: 1 addition & 1 deletion dist/locomotive-scroll.esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* locomotive-scroll v4.0.2 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
/* locomotive-scroll v4.0.3 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
Expand Down
91 changes: 6 additions & 85 deletions dist/locomotive-scroll.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* locomotive-scroll v4.0.2 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
/* locomotive-scroll v4.0.3 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.LocomotiveScroll = {}));
}(this, (function (exports) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.LocomotiveScroll = factory());
}(this, (function () { 'use strict';

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
Expand Down Expand Up @@ -3100,85 +3100,6 @@
return Smooth;
}();

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

_classCallCheck(this, Native);

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

Object.assign(this, defaults, options);
this.smartphone = defaults.smartphone;
if (options.smartphone) Object.assign(this.smartphone, options.smartphone);
this.tablet = defaults.tablet;
if (options.tablet) Object.assign(this.tablet, options.tablet);
this.init();
}

_createClass(Native, [{
key: "init",
value: function init() {
this.scroll = new _default$1(this.options);
this.scroll.init();

if (window.location.hash) {
// Get the hash without the '#' and find the matching element
var id = window.location.hash.slice(1, window.location.hash.length);
var target = document.getElementById(id); // If found, scroll to the element

if (target) this.scroll.scrollTo(target);
}
}
}, {
key: "update",
value: function update() {
this.scroll.update();
}
}, {
key: "start",
value: function start() {
this.scroll.startScroll();
}
}, {
key: "stop",
value: function stop() {
this.scroll.stopScroll();
}
}, {
key: "scrollTo",
value: function scrollTo(target, options) {
this.scroll.scrollTo(target, options);
}
}, {
key: "setScroll",
value: function setScroll(x, y) {
this.scroll.setScroll(x, y);
}
}, {
key: "on",
value: function on(event, func) {
this.scroll.setEvents(event, func);
}
}, {
key: "off",
value: function off(event, func) {
this.scroll.unsetEvents(event, func);
}
}, {
key: "destroy",
value: function destroy() {
this.scroll.destroy();
}
}]);

return Native;
}();

exports.Native = Native;
exports.Smooth = Smooth;
exports.default = Smooth;

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

})));
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.

2 changes: 1 addition & 1 deletion docs/dist/styles/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "locomotive-scroll",
"version": "4.0.2",
"version": "4.0.3",
"description": "Detection of elements in viewport & smooth scrolling with parallax effects.",
"repository": "locomotivemtl/locomotive-scroll",
"author": "Locomotive <[email protected]> (https://locomotive.ca)",
Expand Down

0 comments on commit 68235ee

Please sign in to comment.