Jump to content
Search Community

testerhs567

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by testerhs567

  1. 9 hours ago, GreenSock said:

    Yeah, a minimal demo will go a very long way toward getting you a solid answer, but it kinda sounds like maybe you are lazy-loading images such that they don't trigger the window's "load" event when they're done (which would fire the ScrollTrigger.refresh()). If that's the case, you need to either call ScrollTrigger.refresh() once your page layout is settled (after images finish loading), or explicitly set the width/height of your images so that there is no shifting of the layout when they finish loading. 

    i don't think so , because if the cuz's the lazy loading it's will not work in first visit , but it's work like charm , i'll try other approaches to solve it thanks 

  2. 19 hours ago, GSAP Helper said:

    Without a minimal demo, it's very difficult to troubleshoot; the issue could be caused by CSS, markup, a third party library, a 3rd party script, etc. Would you please provide a very simple CodePen or Stackblitz that illustrates the issue? 

     

    Please don't include your whole project. Just some colored <div> elements and the GSAP code is best. See if you can recreate the issue with as few dependencies as possible. Start minimal and then incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, at least we have a reduced test case which greatly increases your chances of getting a relevant answer.

     

     

    that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo

     

     

    Using a framework/library like React, Vue, Next, etc.? 

    CodePen isn't always ideal for these tools, so here are some Stackblitz starter templates that you can fork and import the gsap-trial NPM package for using any of the bonus plugins: 

     

    Please share the StackBlitz link directly to the file in question (where you've put the GSAP code) so we don't need to hunt through all the files. 

     

    Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. 

    Thanks , for the demo is hard  to implement it as basic , but just the response i'm look for is there's some methods for reregister the plugin and i will because the issue happen just when i go to other /n project soo that refresh or whatever if already built in , i think will solve

    Thanks for your time

     

  3. Hi everyone,

    I'm experiencing an issue with my animation. I've searched through existing topics, but couldn't find a solution that matches my problem. To provide some context, I've created a dynamic page for displaying project details. It consists of a description section on the left and an image section on the right. The description is scrollable, and the image changes based on the current description.

    The issue like i start from project/1 i show all there descriptions all good but when i go to the project/2 or project/^n the scroll still in the register or some where that affect to my animation (the scroll affect to the first image because the scroll still ) ,However, everything works fine if I refresh the page like what i want ,

    So, I'm looking for a solution to reset the ScrollTrigger and resizing functionality dynamically. (methods or props in the useGSAP)

     

    Thanks for your help, and I apologize for the lengthy explanation. I just wanted to ensure the context is clear. 

     gsap.registerPlugin(ScrollTrigger);
      const workInfoItemsRef = useRef();
      let imageRefs = useRef([]);
      const ParrentRef = useRef();
      useGSAP(
        () => {
          // initialise the imageRefs
          if (
            workInfoItemsRef.current &&
            imageRefs.current.length > 0 &&
            NumberOfFeature > 1
          ) {
            // N2aficti ZIndex  directly  lrefs:
            imageRefs.current.forEach((item, index) => {
              item.style.zIndex = imageRefs.current.length - index;
            });
            // nInitialiser clip-path b refs:
            gsap.set(imageRefs.current, {
              clipPath: function () {
                return "inset(0px)";
              },
            });
    
            // nCriyi  l'animation :
            const animation = gsap.to(
              imageRefs.current, // fiha ta last child ! rd lball
              {
                clipPath: function (i) {
                  return i != imageRefs.current.length - 1
                    ? "inset(0px 0px 100% 0px)"
                    : "inset(0px)";
                },
                stagger: 2,
                ease: "none",
              }
            );
    
            // nCriyi ScrollTrigger l Parrent  ref:
            ScrollTrigger.create({
              trigger: ParrentRef.current,
              start: "top bottom",
              // markers:true,
              animation: animation,
              scrub: 1,
            });
          }
        },
        { dependencies: [CurrentProject], scope: ParrentRef, revertOnUpdate: true }
      );

     

    Scrolltrigger.PNG

  4. by the way thanks for your response i try to configure it in stackbliz but i get a lot of bugs in it image.thumb.png.4be89cd0e2d65b3a2a375b67df1ffe3d.pngso i will try to find and fix my principle issue for the images , thanks ;}  

  5. 21 hours ago, Windpixel said:

    Hi testerhs567,

     

    I went to take a look at your project link, but link is broken (404), if you can check your link then we can take a look at your minimal demo.

     

    - Lance

    Try now i update it ,i wish anybody here can help little :} Thanks

×
×
  • Create New...