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

Diagonal scrolling with trackpad in react-infinite-viewer #75

Open
emedd33 opened this issue Mar 12, 2024 · 2 comments
Open

Diagonal scrolling with trackpad in react-infinite-viewer #75

emedd33 opened this issue Mar 12, 2024 · 2 comments

Comments

@emedd33
Copy link

emedd33 commented Mar 12, 2024

Wondering how one can create a diagonal scrolling with with react-infinite-viewer. I see from the main demo that when you swipe by using two fingers on a trackpad you are able to scroll diagonally.
This is nicely shown in the daybrush demo
https://daybrush.com/infinite-viewer/

However in all the sandbox examples using react-infinite-viewer I'm unable to swipe scroll diagonally. It either goes horizontally or vertically. Is this something that is missing in the react-infinite-viewer?

https://codesandbox.io/p/sandbox/demo-5sr1h?file=/src/Editor/Editor.tsx

@Develer
Copy link

Develer commented Apr 25, 2024

useWheelScroll: true option should do the trick

@magnus-ISU
Copy link

This doesn't appear to work in svelte. Here's my app:

<script lang="ts">
	import InfiniteViewer from 'svelte-infinite-viewer';
</script>

<InfiniteViewer className="viewer" useAutoZoom={true} useWheelScroll={true} useMouseDrag={true}>
	<div>Test some text out</div>
</InfiniteViewer>

<style>
	:global(*) {
		margin: 0;
		padding: 0;
	}
	:global(.viewer) {
		width: 100vw;
		height: 100vh;
		color: white;
		background-color: #222;
	}
</style>

Am I missing something? (demo on daybrush works)

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

No branches or pull requests

3 participants