
ChrisA
-
Posts
7 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
ScrollTrigger Demos
Downloads
Posts posted by ChrisA
-
-
Hi guys,
I've got a question about dragClickables. I am using <select> and <input> within a draggable instance, if i do not set dragClickables then they are active and receive focus or open but when i set the variable then nothing works. I have created a code pen for my problem:
See the Pen hjFds by c-andrews (@c-andrews) on CodePen
I can add the onClick to the options of my Draggable instance so that i can trigger the focus or click but then i have issues with the <select>.
Thanks,
Chris
-
If anyone else tries to implement it and has issues, I have found that it breaks by adding edgeResistance to the child Draggable
var parent = Draggable.create("#parentContainer", { type:"x", onDragStart:function() { child[0].disable(); }, onDragEnd:function() { child[0].enable(); } }); var child = Draggable.create("#childContainer", { type:"scrollTop", edgeResistance: 0.75, onDragStart:function() { parent[0].disable(); }, onDragEnd:function() { parent[0].enable(); } });
-
-
1
-
-
Hi guys,
Looking at Marks last codepen (
See the Pen KgIaJ by markmacumber (@markmacumber) on CodePen
) is there a way to get the dominant direction x or y and enable or disable the parent or child. So for example:I drag a card to the left so the parent scrolls and disables any children?
Or
I drag a card up so the child scrolls and the parent gets disabled?
I have seen this:
onDragStart : function() { parent.disable(); }, onDragEnd:function() { parent.enable(); }
and it works well for disabling the parent. But it will always disable the parent. So I need to find out if x direction is dominant so i can disable the child and not the parent.
Hopefully that makes sense.
Thanks,
Chris
-
Thanks guys that's a great help. I'll let you know if I have any other questions,
Cheers,
Chris
-
Hi all,
Could you tell me what would be the best way to apply the ThrowPropsPlugin to control the "time" of a TimelineMax instance? I don't mean adding ThrowProps to a Timeline, instead I want to control the timeline.time and to move to specific labels within that timeline.
Currently I am just using the following to tween to a specific label within the timeline:
myTimeline.tweenTo( label )
Can I use ThrowProps withing the object params of tweenTo? Or is it best to use:
ThrowPropsPlugin.to( timeline, { params... } )
Thanks in advance
Chris
dragClickables question
in GSAP
Posted
Hi Jonathan,
Thanks for your response. I am still having trouble with it tho. Can you tell me what browser your using? I can get it to work in Firefox but it doesn't seem to be working in Safari and Chrome. Im on a Mac btw. Not sure if thats going to make any difference.
I am trying to make <a>, <input> <select>, <button>, and <textarea> all draggable but I also would like to keep the default browser behaviour. Is this going to be possible? I am building a PhoneGap app which uses alot of these elements so it makes dragging the page difficult if i set dragClickables to false.
Thanks