Jump to content
Search Community

phoenixrip

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

804 profile views

phoenixrip's Achievements

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

2

Reputation

  1. Yes :) Both of these work perfectly! Wish I could mark both as solved. Thank you both so much for such quick and easy to understand answers! Blake I'm now wondering for a different but similar interface if there is an easy way of applying a similar sort of delay to your beautiful SortableGrid example, so that instead of switching positions in the array and re-laying out every element you hover over on your way to a new location, it only switches the none dragged item with the empty spot when you've been over its row/col for a little bit (preserving the order of the rest of the array a little more deliberately). I'm gonna have a go at this myself, but I figured since the master is here I might ask Thanks again guys! Really appreciate it.
  2. Hi gsap gurus. Just wondering what the smartest way of setting some kind of timer / timeout in a hitTest that is occurring in the onDrag function, so that I can run a function/animation only if the hitTest has been true for more than 0.8 seconds? Thanks in advance
  3. For anyone coming here looking for the same solution, it should maybe be noted that the code Blake very helpfully posted will cause any onThrowEnd function you have to be called at the same time as onDragEnd as it sets the throw tween progress to 1 (ie finished so fire the onThrowEnd) and then back again. I got round this by using 0.99 progress to do the hitTest, almost exactly the same as the final position, but without accidentally triggering my onThrowEnd before the throw has really begun onDragEnd: function(){ var hit = false if (this.tween) { this.tween.progress(0.99) hit = this.hitTest(centerpoint, '5%') this.tween.progress(0) } },
  4. Is there a smart way of performing a hitTest when then drag part of a throw finishes (onDragEnd), but hit testing what will be the final position of the element once the throwprops tween has finished? I know I can access the end x and end y in onDragEnd but don't know how I would go about using the this.hittest with that Thanks in advance
×
×
  • Create New...