Update Gumshoe to v5.1.1

Fixes #2140
This commit is contained in:
Michael Rose 2019-04-30 08:26:53 -04:00
parent 3f83a0df91
commit abf71c6b2a
4 changed files with 10378 additions and 15 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/*! /*!
* gumshoejs v5.1.0 * gumshoejs v5.1.1
* A simple, framework-agnostic scrollspy script. * A simple, framework-agnostic scrollspy script.
* (c) 2019 Chris Ferdinandi * (c) 2019 Chris Ferdinandi
* MIT License * MIT License
@ -108,12 +108,14 @@
* @param {Array} contents The content areas * @param {Array} contents The content areas
*/ */
var sortContents = function (contents) { var sortContents = function (contents) {
if(contents) {
contents.sort((function (item1, item2) { contents.sort((function (item1, item2) {
var offset1 = getOffsetTop(item1.content); var offset1 = getOffsetTop(item1.content);
var offset2 = getOffsetTop(item2.content); var offset2 = getOffsetTop(item2.content);
if (offset1 < offset2) return -1; if (offset1 < offset2) return -1;
return 1; return 1;
})); }));
}
}; };
/** /**
@ -409,7 +411,7 @@
// Setup debounce callback // Setup debounce callback
timeout = window.requestAnimationFrame((function () { timeout = window.requestAnimationFrame((function () {
sortContents(); sortContents(contents);
publicAPIs.detect(); publicAPIs.detect();
})); }));
@ -422,7 +424,7 @@
// Undo DOM changes // Undo DOM changes
if (current) { if (current) {
deactivate(current); deactivate(current, settings);
} }
// Remove event listeners // Remove event listeners

10364
assets/js/vendor/jquery/jquery-3.3.1.js vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -26,7 +26,7 @@
"uglify-js": "^3.4.9" "uglify-js": "^3.4.9"
}, },
"scripts": { "scripts": {
"uglify": "uglifyjs assets/js/vendor/jquery/jquery-3.3.1.min.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.ba-throttle-debounce.js assets/js/plugins/smooth-scroll.js assets/js/plugins/gumshoe.js assets/js/_main.js -c -m -o assets/js/main.min.js", "uglify": "uglifyjs assets/js/vendor/jquery/jquery-3.3.1.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.ba-throttle-debounce.js assets/js/plugins/smooth-scroll.js assets/js/plugins/gumshoe.js assets/js/_main.js -c -m -o assets/js/main.min.js",
"add-banner": "node banner.js", "add-banner": "node banner.js",
"watch:js": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build:js", "watch:js": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build:js",
"build:js": "npm run uglify && npm run add-banner" "build:js": "npm run uglify && npm run add-banner"