Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Diaco last won the day on December 20 2017

Diaco had the most liked content!

Diaco

Moderators
  • Posts

    1,215
  • Joined

  • Last visited

  • Days Won

    86

Posts posted by Diaco

  1. Hi @geddski  :)

     

    At first, for the Club GreenSock bonus plugins on Codepen; you can find the codepen safe versions here: 

    See the Pen OPqpRJ by GreenSock (@GreenSock) on CodePen

     

     

    And about your issue; pls try to wrap your spacing entities with a span tag. <span>&nbsp;&nbsp;.....</span> 

     

    Splittext completely respects to <br> tags.

     

    btw, you can use "&emsp;" instead of "&nbsp;"

    • Like 6
  2. Hi heldrida  :)

     

    pls try this :

     

    var myTween = TweenLite.to(elem, 1,{x:100 , paused:true}); // your tween or timeline
    
    TweenLite.fromTo(myTween,1,{progress:0.5},{progress:1}) // tween from to target progress
    
    TweenLite.fromTo(myTween,1,{time:0.5},{time:1}) // tween from to target time
    • Like 5
  3. in addition to  Dipscom  answer , if I understand correctly ; pls try this :

     

    var tl = new TimelineMax({ repeat:-1, yoyo:true, repeatDelay:1 })
    .from(["#path1","#path2"], 1, {drawSVG:"0%", ease:Power2.easeInOut})
    .to(["#path1","#path2"], 1, {drawSVG:"100% 100%", ease:Power2.easeInOut})
    • Like 6
  4. Hi :)

     

    pls try like this : 

     

    function tlGenerator(target){
      var tl = new TimelineLite()
      tl.to( myTarget, 1, {x:300});
      return tl; // you can store generated timeline to be controllable like this : var myNewTl = tlGenerator(myTarget);
    }
    
    var myTarget = $(".red"); 
    
    var redTl = tlGenerator(myTarget);
    
    $("#play").click(function(){
      myTarget = $(".blue");
      tlGenerator(myTarget);
      
      redTl.reverse();
    });

    See the Pen GNxyWy by MAW (@MAW) on CodePen

    • Like 2
  5. Hi  hugonoro  :)

     

    for getting the last position of the draggable element please try something like this : 

     

    var lastPos = {x:0,y:0};
    Draggable.create( elem , {
      type: "x,y",
      onPress:function(){
        lastPos.x = this.x;
        lastPos.y = this.y; 
        console.log(" last position : "+ lastPos.x , lastPos.y); // get Draggable current position
      },
      onDragEnd:function(){
        if( your logic ){ TweenLite.to(this.target,1,{ x:lastPos.x , y:lastPos.y }); }
      }
    });   
    • Like 6
×