Jump to content
Search Community

Rotation & switching SVG Paths on scroll direction

mark_39159 test
Moderator Tag

Go to solution Solved by mark_39159,

Recommended Posts

Hi Everyone,

 

First time here so please bear with me.
I was inspired by an example of what looked like a bike route on a very large map. I have quickly created a map that looks like a UK motorway network and show app screens at key points in the journey. I've pushed this live for the time being here to see the bigger picture. https://nextjunctionapp.com/

 

I'm experiencing a couple of problems which is probably my lack of my understanding. First one is if I use autoRotation: true,  the arrow just resets its to the same position when scrolling in the other direction.

 

Second one  if possible is to add the arrow to another path id on scroll up. The reason for this is that when the arrow is travelling along the path in the opposite direction, it would slip off the motorway junctions on the opposite side too? just like a car would behave. if that makes sense :)

 

Any pointer would be very warmly welcome :) 

 

See the Pen MWqWjom by mark-pierce (@mark-pierce) on CodePen

Link to comment
Share on other sites

Now that one I'm not sure about. I assume the path would match up in some areas and then divert at a certain point?

It sounds incredibly complicated. How would you know what position you should be on path 'b' when you change direction on path 'a'? The visual placement and the animation 'progress' placement would be different I assume?

I'm not saying it's impossible, I just think it may be beyond the help we can offer here for free.

We do custom consulting so if that's an option for you let us know and we can explore options.

Link to comment
Share on other sites

  • Solution

Hi Cassie,

 

You're 100% correct with all your questions. The the 2 paths are very similar. Mainly going round roundabouts the correct way and leaving junctions on the return journey.

 

Let me take the idea away and see if the features adds enough value to get funding for consultation. 

Your contribution has been fantastic and I thank you so much for your time and effort today.

 

Have a great rest of your week. Happy coding.
 

  • 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...