fix: gsap scroll fixes at routing
This commit is contained in:
@@ -4,10 +4,9 @@ import AboutMe from "../components/slim/AboutMe.vue";
|
||||
|
||||
import { onMounted, nextTick } from "vue";
|
||||
import gsap from "gsap";
|
||||
import ScrollTrigger from "gsap/ScrollTrigger";
|
||||
import ScrollSmoother from "gsap/ScrollSmoother";
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
|
||||
gsap.registerPlugin(ScrollSmoother);
|
||||
|
||||
onMounted(async () => {
|
||||
await nextTick();
|
||||
@@ -15,11 +14,9 @@ onMounted(async () => {
|
||||
ScrollSmoother.create({
|
||||
wrapper: "#smooth-wrapper",
|
||||
content: "#smooth-content",
|
||||
smooth: 0.2,
|
||||
smooth: 1.5,
|
||||
effects: true,
|
||||
});
|
||||
|
||||
ScrollTrigger.refresh();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user