You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using scrollmagic and gsap in svelte component like this:
//Hero Component<script>
import {onMount} from 'svelte'
import ScrollMagic from 'scrollmagic'
import {TweenMax} from 'gsap'
import {ScrollMagicPluginGsap} from "scrollmagic-plugin-gsap";
ScrollMagicPluginGsap(ScrollMagic, TweenMax);
let imgContainer;
let image;
onMount(() =>{TweenMax.defaultOverwride=false;varcontroller=newScrollMagic.Controller();varimageScene=newScrollMagic.Scene({offset: 0,duration: 500}).setTween(TweenMax.fromTo(imgContainer,0.2,{scale: 2.1},{scale: 1,overwrite: false})).addTo(controller);})
</script><divbind:this={imgContainer}><imgbind:this={image}src="/path/to/image"/></div>
I load the Component like this:
<script>
import {onMount} from 'svelte';
let MyComponent;
onMount(async () =>{constmodule=awaitimport('my-non-ssr-component');MyComponent=module.default;});
</script><svelte:componentthis={MyComponent}foo="bar"/>
So but when i start scrolling i get the error: tween was overwritten by another
I know the scrollmagic guide about this but the solutions doesn't work in my environment.
Any ideas, how can i fix that?
The text was updated successfully, but these errors were encountered:
I am using scrollmagic and gsap in svelte component like this:
I load the Component like this:
So but when i start scrolling i get the error:
tween was overwritten by another
I know the scrollmagic guide about this but the solutions doesn't work in my environment.
Any ideas, how can i fix that?
The text was updated successfully, but these errors were encountered: