elrumordelaluz / reactour

Tourist Guide into your React Components
https://react.tours
MIT License
3.85k stars 351 forks source link

Make tour start transition animation from specific point of the screen #188

Open ramusus opened 5 years ago

ramusus commented 5 years ago

I'm looking the way to tweak tour appearing behavior.

What I see now:

When tour appears for first time, it always starts from left top corner of the screen and with some transition animation move to the position of the first step. If I close in on N step and open it again, it moves from the position of N step to position of 1 step (thanks to startAt={0} prop).

What I want:

I need transition animation to start from specific point of the screen. In my case it's the icon to enable tour mode.

I see state vars responsible for positioning, but if I change them on componentDidMount to some other values this.tourRef.current.setState({ top: 500, left: 500 }); it still appears in the top left corner instead of my desired 500x500 point.

What am I missing? Is there another way to achieve what I want?

elrumordelaluz commented 5 years ago

Hi @ramusus, thanks for open the Issue. Interesting, let me dig deep in to it and back to you asap.

asile12 commented 3 years ago

Hi, any update on this?

edwindelbosque commented 3 years ago

same here..

Rahulkr204 commented 3 years ago

Anyone able to figure this out?

emma-adams-machine commented 3 years ago

Have the same issue. Any updates on to how deal with it?

elrumordelaluz commented 3 years ago

@emma-adams-machine did you tried using the last version of @reactour/tour?

Should be solved there. Let me know in any case. Thanks,

emma-adams-machine commented 3 years ago

@elrumordelaluz I tested with both versions but it's not working properly :(

elrumordelaluz commented 3 years ago

@emma-adams-machine can you pleae share a minimal reproduction sandbox?

ZowieTao commented 7 months ago

@emma-adams-machine can you pleae share a minimal reproduction sandbox?

https://docs.react.tours/tour/examples

all of exp