texte und scroll fix
This commit is contained in:
@@ -18,10 +18,10 @@ let smoother: ScrollSmoother | null = null;
|
||||
onMounted(async () => {
|
||||
await nextTick();
|
||||
|
||||
ScrollSmoother.create({
|
||||
smoother = ScrollSmoother.create({
|
||||
wrapper: "#smooth-wrapper",
|
||||
content: "#smooth-content",
|
||||
smooth: 0.2,
|
||||
smooth: 1.5,
|
||||
effects: true,
|
||||
});
|
||||
|
||||
@@ -31,8 +31,6 @@ onMounted(async () => {
|
||||
onUnmounted(() => {
|
||||
smoother?.kill();
|
||||
smoother = null;
|
||||
|
||||
ScrollTrigger.getAll().forEach((trigger) => trigger.kill());
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -2,21 +2,31 @@
|
||||
import Main from "../components/slim/Main.vue";
|
||||
import AboutMe from "../components/slim/AboutMe.vue";
|
||||
|
||||
import { onMounted, nextTick } from "vue";
|
||||
import { onMounted, onUnmounted, nextTick } from "vue";
|
||||
import gsap from "gsap";
|
||||
import ScrollTrigger from "gsap/ScrollTrigger";
|
||||
import ScrollSmoother from "gsap/ScrollSmoother";
|
||||
|
||||
gsap.registerPlugin(ScrollSmoother);
|
||||
gsap.registerPlugin(ScrollTrigger, ScrollSmoother);
|
||||
|
||||
let smoother: ScrollSmoother | null = null;
|
||||
|
||||
onMounted(async () => {
|
||||
await nextTick();
|
||||
|
||||
ScrollSmoother.create({
|
||||
smoother = ScrollSmoother.create({
|
||||
wrapper: "#smooth-wrapper",
|
||||
content: "#smooth-content",
|
||||
smooth: 1.5,
|
||||
effects: true,
|
||||
});
|
||||
|
||||
ScrollTrigger.refresh();
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
smoother?.kill();
|
||||
smoother = null;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user