Jump to content
Search Community

mimeartist

Business
  • Posts

    133
  • Joined

  • Last visited

Everything posted by mimeartist

  1. http://codepen.io/anon/pen/ogavpy I've updated it to show what it should do... so I should put a isDragging where it updates the position of the other div?
  2. I think it has something to do with me update the position of the other item that is draggable / throwable during the update
  3. here is the codepen for it... http://codepen.io/anon/pen/ogavpy Note that you can only drag item 2 when the throwUpdate has completed, how do I override that?
  4. mimeartist

    onThrowUpdate

    I'm finding that when I use onThrowUpdate as it is being called, other items are not able to be dragged? Does it lock out other drags whilst it's doing it's thing?
  5. I'm such an idiot... I'd done this... and it wasn't working... turned out I was typing 'underfined' if (typeof Draggable.get($(tempClip))!='undefined'){ Draggable.get($(tempClip)).kill(); }
  6. Thanks Jonathan, it's not the element I need to check for, it's whether it has a draggable assigned to it... ideally I'd keep a track on them all but hoping there is a simple way to just check if the draggable exists first as it's not a certainty that some items are draggable.
  7. Is there a way of checking a draggable instance of a div exists? I'm using kill() for something but it is throwing an error if I try and kill something that's not there, so my question is, can i check for the draggable without getting an error?
  8. Sorry for not supplying a codepen... I'll give the kill() a try... I've got a load of images that you can drag around... but when they're enlarged they're only allowed to drag in one direction, so I was looking for a way to turn off one of the axis... but I'm doing a whole load of other stuff going on too, so I think kill will be best, as mutlipurposing the divs is a bit of a headache (for me anyway) Thanks Jack! James
  9. PS If I start using draggable with type: 'x' do I need to change my TweenMax calls to x rather than left?
  10. Sorry... should of made more sense... how do I change on the fly a draggable that was in both directions, and then just set to one axis? in fact is there a way of removing all the draggable features, and then applying new ones, concerned that applying a draggable twice might start to cause issues?
  11. I have a div that is draggable in all directions, what's the best way to alter it so that it is only draggable in one axis? e.g. going from type: 'left, top' and change it to just type : 'left'?
  12. mimeartist

    Rounding?

    Thanks for your help the both of you. I'll always go for the 'maths' version, as at least I can see logically something will work 'hopefully' across browsers... Thanks for the codeine I'm actually going to see if I can not move the mesh, and just animate the images below it.
  13. mimeartist

    Rounding?

    I've got some images that I'm animted that have a mesh type graphic layered over the top, as the tweens occur they tend to shimmer / moire... is there a way of using a tween with a rounding to the nearest nth pixel... e.g every 4th pixel for example?
  14. So... Draggable.get('#slide' + theBounder).applyBounds({minX:-1000, maxX:10000, minY:-1000, maxY:10000}); Seems to work... I'm assuming this won't have any performance impact... I know what you're saying about just turning off the 'draggability', but this easier than keep track of which ones to turn on and off... as the animating them offscreen was getting screwed up by the bounds somehow.
  15. Trouble is the site is too complicated to make a simple Codepen... sorry... So I'm assigning this now when the user starts to drag Draggable.get('#slide' + theBounder).applyBounds("#siteContainerInside"); is there a way to turn off bounds after onDragEnd? guess I could set a bounds that is much bigger than the webpage, but just wondering if there is a way to remove it?
  16. Is there a way of only using the bounds when an item is being dragged... I'm trying to animate items off screen, and when I start to animate them, if they're already offscreen they arrive into the div they're bound to... but I only need them to stick to the bounds when dragging. Hope that makes sense!
  17. Ignore this... worked it out... with a comma and a space! TweenMax.to('#slideInside3, .projectBodycopy', 0, {color:myFG});
  18. I'm assuming that to change the color of a load of classes, it is best to identify the div they're in, rather than traversing the whole DOM I'm trying to adjust all the items with class '.projectBodycopy' within the div named '#slideInside4' Is there a simple notation with jQuery I should be following? TweenMax.to('#slideInside3.projectBodycopy', 0, {color:myFG}); Thanks, James
  19. Thanks Jack, I just googled this, and found my own question... Thanks for answering it! Happy Thanksgiving! James
  20. Thanks Diaco, Actually fixed it as I was outputting the style sheet via php, and was putting a semi colon on the end of each style, so it was breaking the next style, and importantly the one I was looking at in my tests!
  21. I'm tryiing to use draggable and scrollTop for some scrollbars, but it seems to only be taking the style for the whole page even though I'm assigning styles to the divs I'm setting as draggable... how do i assign them on a div by div or class basis? ::-webkit-scrollbar-thumb { border-radius:0; background:#666666; } .aboutScrollStyle::-webkit-scrollbar-thumb { background:#FFFFFF; }; .peopleScrollStyle::-webkit-scrollbar-thumb { background:#FFFFFF; }; Thanks, James
  22. If I've got 10 items all of the same class... and use contactDrag = Draggable.create(".contactSheetSquare", {type:"top, left", throwProps:true, dragClickables:true, edgeResistance:0.9, onDragStart:function() { doDrag(this); } }) How do I get the id in the function doDrag... it doesn't seem to want to grab it?
  23. I'm an idiot. Thanks! Was trying it in different orders and all sorts!
  24. mimeartist

    onComplete ?

    I'm trying to get something to animate one way, and then back the other way... by calling the function that the call was in originally... but just not working, as you can see I'm decreasing the angle each time (albeit to the negative each time) http://codepen.io/anon/pen/jHrze What am I doing wrong? The reason I want it as a function, is that I'd like to just call various flags whenever I want (the proper version will use an array of values) but trying to keep it simple for the code pen
  25. Thanks Rodrigo, Sorry I haven't replied sooner... I thought I was being notified when a reply came in, but just saw this by chance... will have a look and see how I get on James
×
×
  • Create New...