Jump to content
Search Community

Trigger depending on the panel the cursor is over...

mimeartist test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I've just been trying that and works a treat, thanks... is there any other method as from looking into it IE10 and below don't support that? And the client base for my project are institutions that are very likely to be using one of those versions

Link to comment
Share on other sites

I don't quite understand what you're looking for exactly, but here's a little demo of using an onPress that runs some logic and conditionally tells the #box1 draggable to start instead of the panel. Switch the panelIsOnTop variable to true to see just the panel dragging. 

 

http://codepen.io/anon/pen/ByqRPX

 

Obviously you'd need to create your own logic to determine when something is supposed to be "in front" or "behind" or whatever, but my goal was just to show how you could use an onPress to pass things off to another Draggable. 

  • Like 2
Link to comment
Share on other sites

Im a little late on this.. but if you want to have a workaround for pointer-events in IE11 and below.. check this out:

 

See the Pen BriCb by jonathan (@jonathan) on CodePen

 

When you go to the above link.. do the following:

  • Try clicking a small box when the red bar animates down
  • When the checkbox is checked you can click through the red bar to a small box
  • If the checkbox is unchecked you can NOT click through the red bar

I hope this helps! :)

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...