Jump to content
GreenSock

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

st3f

ShockinglyGreen
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

7 Newbie

About st3f

  • Rank
    Newbie
  • Birthday August 24

Profile Information

  • Gender
    Male
  • Location
    Paris
  1. st3f

    Draggable scope: argh!

    Yes I did... and, yes, " draggableElem is just a single element ". you are very, very kind, @OSUblake you saved my working sunday Thanks a lot
  2. st3f

    Draggable scope: argh!

    Hi guys, a very weak coder here, I know, so please help... I have a class creating/handling controls for a html5 video object. I copied somewhere here the draggable code for the scrubber and it works fine when in global javascript, but now... I have, clearly, a conflict of "this"s. // a method of my class setDraggable(){ this.offsetLeft = $('.scrubber').offset().left; this.scrubberWidth = this.screenWidth; TweenLite.set(".progress", {scaleX:0, transformOrigin:"left"}); this.draggableElem = $('.vidcontrols-cursor') Draggable.create(this.draggableElem, { type:"x", trigger:".scrubber", bounds:".scrubber", onPress:function(e) { TweenLite.set(this.target, {x:this.pointerX - this.offsetLeft/* offsetLeft: a class' property...*/}); this.update(); updateProgressBarScale(this); // A class' method :( }, onDrag:function() { // stuff here }, onDragEnd:function(){ // stuff here } }); } It's hours I'm trying to address my class' methods from inside Draggable (using onDragScope, for example) but that's something I can't figure out. Thank in advance
  3. Yes, clearly... Thanks a lot OSUblake
  4. Sorry Guys, I perfectly this is not the right place for that, but I'm sure it's full of Jquery wizards here... and I'm clearly missing something. I don't know (nor found out somewhere, sorry) how to refer to a JS class method from inside this &%/()@, damned jquery.click... (Arrrrgghhhh) Thank you forever thank you class Anthony extends Paul { constructor(data){ super(data); // sets a reference in Pippo this.data.refObj = this; // ref to div this.myDiv = this.data.myDiv; this.content = this.data.content; this.btnlabel = this.data.btnlabel; var p = $('<div>'+ this.content +'</div>'); p.css({'...'}); var bt = $('<div>'+ this.btnlabel +'</div>'); bt.css({ '...' }) /* bt.click(function() { And here, Gentlemen, I'd like very much to call... ...showMe() ! (Somehow) }); */ this.myHtml = p; this.myHtml.append(bt); this.myFadeTime = 0.6; this.showMe(); } } Anthony.prototype.showMe = function(){ // update data in Array //... $(this.myDiv).css('opacity','0'); $(this.myDiv).html(this.myHtml); TweenMax.to(this.myDiv, this.myFadeTime, {opacity:'1'}); }
  5. st3f

    Salut (non technical)

    Hi Guys, just here to say hello and thank you. It's two weeks I'm working on a JS project with a lot of GSAP and... I didn't have to ask anything . All I need is in this forum. Merci!
×