Jump to content
GreenSock

martis last won the day on July 28 2012

martis had the most liked content!

martis

ShockinglyGreen
  • Posts

    212
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by martis

  1. Hey guys, I have a reference to my Draggable object (drag). Is there a method or way to update the maxDuration after setup has occurred? Thanks..
  2. Heya, Any plans to release TransformAroundPointPlugin for JS? Anyone have an example of an element rotating around a fixed point in JS? Thanks!
  3. Nice work Jack! That seemed to of killed any sort of overshooting while using my custom snapping with overshootTolerance:0 !
  4. Thanks Carl, Any clue where I can find the default throwProps config? I literally only want to change the overshootTolerance Here is my current code: drag = Draggable.create('#proxy', { type:"y", bounds:$('#proxyContainer'), trigger:$('#site'), force3D:true, dragClickables:false, zIndexBoost:false, edgeResistance:.8, dragResistance:.5, throwProps:true, minDuration:.75, snap: { y: function(endValue) { if (!snapping) { snapping = true; var lastEndValue = snapPoints[snapIndex]; if (endValue < lastEndValue+56 && snapIndex < snapPoints.length-1) { snapIndex++; } else if (endValue > lastEndValue-56 && snapIndex > 0) { snapIndex--; } } return snapPoints[snapIndex]; } }, onDragStart:function() { snapping = false; }, onDragEnd:function() { snapping = false; }, onDrag:function () { processMobileTimeline(this.y); }, onThrowUpdate:function() { processMobileTimeline(this.y); } })[0];
  5. Hey guys, Is there a simple way in the Draggable config to set overshootTolerance to 0? I have snapping, minDuration, and throwProps on and don't want my object to overshoot the target. Thanks!
  6. Hey guys, I had two quick questions about snapping with Draggable. Let's say I have an array: [0, 100, 200, 350, 500]; 1. Is there a way to force Draggable (w/ throwProps) to only snap *one* array value from the original value? Meaning if my object is at 200, no matter how hard i flick it, it will only snap to 100 or 350? Not 0 or 500. 2. Also, Is there a way to honor the direction the object is traveling and snap up or down in array based on the direction even if the velocity would not of actually carried the object closer to the next array value? I don't want the object to ever snap back to its original drag position, rather I want the object to go forward or backward in the snap array. Thanks!
  7. Thanks Jamie! http://jsfiddle.net/9c4we/2/ Works like a champ
  8. I like using CODA2 on mac: http://panic.com/Coda/
  9. Hey guys, I am trying to enable both click and drag on an element inside a Draggable. Thanks to jamie's great solution: http://codepen.io/jamiejefferson/pen/Inolp I was able to get things working (minus android) If you take a look at my fiddle: http://jsfiddle.net/78eDH/ You will notice that the red square both drags and clicks as it should using the trueClick() check. TrueClick() works great for both desktop, and iOS, but fails in Chrome and Firefox on Android. trueClick() always returns TRUE on android, whether or not I moved 2 pixels or 200 pixels. I imagine that chrome and firefox on android are not returning proper values for positionEvent/pageX/pageY? Any help would be much appreciated. (Even a better way to handle the trueClick). Thanks!
  10. Sure thing... really appreciate your help on this and I really do just want Draggable to be the best possible! I have the exact same site minus the Draggable versions (0.9.0 and 0.9.6) http://thegeminisociety.com/gia_90/ http://thegeminisociety.com/gia_96/ NOTE: The draggable is only on iphone/ipad/android The whole site is a draggable instance.. Scroll down to the IMAGES button, click on that, you can click through the photos at that point. Notice in 0.9.0 you can click and drag on those two elements. In 0.9.6 you can only drag on them, not click
  11. Totally appreciate the work around Man, that's too bad, I am 100% positive that in version... * VERSION: 0.9.0 * DATE: 2013-09-18 That an object with a click event and "data-clickable", "true" could be both clicked and dragged on. I only have the .min version of 9.0, wanted to dig though the code and see what allowed both.
  12. Ah yes, I do see the events on iOS and Android (what I call mobile). Thanks so much for offering up this solution! Jack, I remember in previous versions 9.2 or abouts that this actually worked right out of the box. I assume the implementation of the dragClickables boolean changed the functionality. Would you ever consider implementing something that allowed you to click AND drag on "links" like Jamie posted? Thanks!
  13. Thanks for the solution Jamie! Works great on desktop, not getting the click events on mobile though, any clue?
  14. Thanks for the reply Jamie, Sorry my example may of been too simple. I actually have many objects inside my Draggable Instance. So just imagine I have 100 squares inside a Draggable instance. All those squares have onclick events on them. I want to be able to click the squares which fires their onClick event (can achieve this by using dragClickables:false) Now where this breaks down is I still want to be able to touch and drag on the squares themselves to move the Draggable as normal (cannot achieve this while using dragClickables:false). If set dragClickables:true then I lose my onclick events on my squares. Catch 22! Thanks!
  15. Hey guys, Quick question about the new dragClickables option for draggable... Everything is working as it should, but I want to enable BOTH a click and a drag on an object. Just imagine I have a slide show, and I want to be able to click on the current image to go to a link AND still be able to drag on the image to go to the next one. Thanks!
  16. That fixed it, thanks so much for looking into it Jack!
  17. Really? Try this: http://jsfiddle.net/YQe5Z/5/ The square div can be clicked and drag, but the text cannot.
  18. Here is the JSFiddle - http://jsfiddle.net/YQe5Z/2/
  19. I will work on a fiddle, in the meantime here is my test page... http://thegeminisociety.com/scroller/ Notice if you select the gray background it scrolls, but not the text contained within. I have no interactions setup that may interrupt the draggable.
  20. They are just divs with embedded font inside of them... lemme try adding the data-clickable="false"
  21. I got the draggable working by replacing all the other files... (I am using TweenMax) I did notice one other thing... The object will not drag if I "grab" divs inside of the draggable object. I have to "Grab" the background of the draggable object. Was this a change?
  22. Thanks that seemed to work
  23. Hey guys, I downloaded the latest release and replace ONLY the draggable JS and my objects are not dragging now. I replaced Draggable 0.9.0, any ideas why the new version is not working or has different setup? Thanks
  24. I tried the multitasking gestures on my site and it seemed to fix it! Not a huge deal, but I did notice that if you tab off a site with draggable (ipad), and tab back onto the site with draggable it takes a second or two for the draggable instance to pick up interactivity. I wonder what the cause of this is?
  25. That worked, thanks Jack! Gonna use this approach to prevent over flooding of scroll events
×