Skip to content

Commit

Permalink
Return scroll snooth on ToC
Browse files Browse the repository at this point in the history
  • Loading branch information
AyIong committed Dec 29, 2024
1 parent dd2b736 commit da1ac94
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tgui",
"private": true,
"version": "2.0.3-mediawiki",
"version": "2.0.7-mediawiki",
"scripts": {
"test": "npm -s run lint && tsc && npm run test:unit",
"test:unit": "jest --silent",
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.tgui.js/setupObservers.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const setupTableOfContents = (tocElement, bodyContent, initSectionObserverFn) =>
deferUntilFrame(() => {
// eslint-disable-next-line no-use-before-define
sectionObserver.resume();
}, 3);
}, 150);
};

/**
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.tgui.js/tableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ module.exports = function tableOfContents(props) {
const linkHiddenBottomValue = linkRect.bottom - Math.min(containerRect.bottom, window.innerHeight);

// Respect 'prefers-reduced-motion' user preference
const scrollBehavior = prefersReducedMotion() ? 'smooth' : undefined;
const scrollBehavior = prefersReducedMotion() ? undefined : 'smooth';

// Manually increment and decrement TOC scroll rather than using scrollToView
// in order to account for threshold
Expand Down
2 changes: 1 addition & 1 deletion skin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TGUI",
"version": "2.0.6",
"version": "2.0.7",
"author": ["[https://github.com/AyIong Aylong]"],
"url": "https://www.youtube.com/watch?v=JDQBvN1GATw",
"namemsg": "skinname-tgui",
Expand Down

0 comments on commit da1ac94

Please sign in to comment.