Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom navigator #2530

Open
Whao510 opened this issue May 7, 2024 · 4 comments
Open

Custom navigator #2530

Whao510 opened this issue May 7, 2024 · 4 comments
Labels

Comments

@Whao510
Copy link

Whao510 commented May 7, 2024

https://codepen.io/iangilman/pen/yrGzYZ
Can some one tell me why, in the example above 馃憜, the box in the custom navigator at the bottom right doesn't move the same way as the original box above?
99
I want to move this white rectangle馃憜

@iangilman
Copy link
Member

When I run that CodePen I see a red box in both navigators that both update properly. In your screenshot you're showing a white box and you're saying they aren't moving together. Did you modify the code?

@Whao510
Copy link
Author

Whao510 commented May 9, 2024

@iangilman
I just changed the color of the white box, how can I make the white box move the same as the red box? Now the red box of the original navigator can be dragged by the mouse, but the custom white box mouse can not move it

@Whao510
Copy link
Author

Whao510 commented May 9, 2024

@iangilman What I want to express is that currently only the top navigator's rectangular box can be dragged by the mouse, while the bottom navigator's rectangular box cannot be dragged by the mouse. Please tell me how to make the bottom navigator's rectangular box can be dragged by the mouse

@iangilman
Copy link
Member

Oh, I see! Sure enough, just like the comments at the top of the CodePen say, things like dragging hadn't been implemented there.

You inspired me to try a different approach, actually adding a full navigator instead of faking it. Here's what that looks like:

https://codepen.io/iangilman/pen/JjqdORv

It's still just a proof of concept; there's probably some refinement needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants