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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable drag for selected elements? #54

Open
Nickonimus opened this issue Feb 10, 2024 · 3 comments
Open

How to disable drag for selected elements? #54

Nickonimus opened this issue Feb 10, 2024 · 3 comments
Assignees
Labels

Comments

@Nickonimus
Copy link

I have 360egjs viewer inside a container, how can i make to ignore conveyer drag while rotating 360 panorama?

@malangfox
Copy link
Contributor

Hello @Nickonimus.

The feature to ignore a drag gesture for a specific item inside the conveyer is not currently supported.
Our team will discuss supporting this feature soon.

Currently, you can implement this by accessing the conveyer's private property conveyer._axes._inputs[0]._enabled.
This is not recommended but should be a temporary workaround until we can implement the feature.
You can check the demo implementing this feature by private property.

If this feature is supported in a further version, I'll comment further on this issue.

@malangfox malangfox self-assigned this Feb 10, 2024
@malangfox
Copy link
Contributor

@Nickonimus

Rather than adding this as a new feature, we recommended using event.stopPropagation to ignore the drag for a specific element in conveyer.

Depending on which mousedown or touchdown event you support, you can implement it like this demo.
If you encounter any additional issues implementing this feature, please leave a comment.

@Nickonimus
Copy link
Author

Nickonimus commented Feb 23, 2024

@malangfox Thank you! Sorry, forgot to answer at previous reply.
Actually i used .stopPropagation and it works well, sometimes happens glitchy jumping but mostly when drag fast or move mouse far away out of panorama. Also will try to make ignore stopPropagation when drag started, and enable only when conveyer stopped.

By the way, is there a way to use wheelScrollable option of view360 together with Conveyer side wheel?

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