Jump to content
Search Community

coolfarmer

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by coolfarmer

  1. I think it's worst than before with your 2 solutions. !important added some glitchs and mouseenter instead of :hover with css is not working.

     

    New codepen:

    See the Pen XWmBmJx by coolfarmer (@coolfarmer) on CodePen

     

    My goal is pretty simple, the mouseover should work only if the rectangle is at scale 1.0.

    Open my new codepen and you should see that the mouseover is working.

     

    Now play the animation, the rectangle will scale at 1.3 and the mouseover will stop woking (this is good, I don't want the mouseover at this step).

    Play again the animation, the rectangle will scale back to 1.0, and now the mouseover will not working anymore (this is incorrect).

     

    Others ideas? 🙄

  2.   Ok I think I have the solution!! 😱

    I only had to transfer the 2 css properties (visibility and transformOrigin) from set() to to() and now it work perfectly even if I spam the event.

    this.tl
            .to(details, 0.7, {
                visibility: "visible",  
                transformOrigin: "50% 50%"            
                scale: 2.8,
                x: this.positionElementToCenter(details).x,
                y: this.positionElementToCenter(details).y,
                ease: "Power2.easeInOut"
            });
    • Like 1
  3. Hi guys!

     

    I'm currently using GSAP to zoom a section of a SVG map. Every region on my map have 2 instances (using <use> from SVG). So when I click a region the second instance pass from a visibility:hidden to a visible state. And when I reverse the timeline it go back from visible to hidden.

     

    The problem is that after a few view zoom/unzoom, the visibility stay on a visible state... It can happen randomly between 2-7 zooms.

    I really don't understand that behavior. I think the bug happen fastly if I click quickly. I have a ton of security like a var "isTweening" with a "onReverseComplete" but the samething happen.

     

    Here is my timeline code (inside a Vue Component)

    if (!this.isTweening) {
        this.isTweening = true;
    
        if (this.tl != null) {
            console.log('Using existing TL');
            return this.tl;
        }
    
        const details = this.$parent.$parent.$refs[this.$props.code + '-details'].$el;
        this.tl = gsap.timeline({onReverseComplete: this.onReverseComplete});
        this.tl
            .set(details, {
                visibility: "visible",
                transformOrigin: "50% 50%"
            })
            .to(details, 0.7, {
                scale: 2.8,
                x: this.positionElementToCenter(details).x,
                y: this.positionElementToCenter(details).y,
                ease: "Power2.easeInOut"
            });
    
        this.tl.pause();
    
        return this.tl;
    }

    This timeline is play() when I click on a region and reverse() when I click on the zoomed region.

    Any idea why GSAP can't reverse the property visibility 100% of time?

     

    After 3 hours on this problem, I need help haha.
    Sorry for my english it's not my main language.

     

    Thanks!

     

  4. Yeah !!! Very very good news! You are the best ever team and GreenSock JS have a awesome future!! :-P

     

    Otherwise, I use this topic for a small question about your future, I guess your team was develop others specials properties/plugins like "blur filter" for GreenSock JS ?

    Sorry for my bad english.

     

    Thanks!

  5. Hello guys!!

     

    I have one quesiton for you.

    Can we use multiple boxShadow in TweenMax on same class ?

     

    This code work :

     

    TweenMax.set(".progressBar", {boxShadow:"inset 0px 0px 6px 0px rgba(0, 0, 0, 0.85)"});
     

     

    This code didn't work :

     

    TweenMax.set(".progressBar", {boxShadow:"inset 0px 0px 6px 0px rgba(0, 0, 0, 0.85), 0px 0px 12px 0px rgba(124, 34, 47, 1)"});
     


    Thanks! ^^

×
×
  • Create New...