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

discuss pannable action #6

Open
swyxio opened this issue Nov 1, 2020 · 2 comments
Open

discuss pannable action #6

swyxio opened this issue Nov 1, 2020 · 2 comments

Comments

@swyxio
Copy link
Owner

swyxio commented Nov 1, 2020

export function pannable(node: HTMLElement): ReturnType<Action>

Creates panstart, panmove, panend events so you can drag elements.

<div class="box"
	use:pannable
	on:panstart={handlePanStart}
	on:panmove={handlePanMove}
	on:panend={handlePanEnd}
></div>

Demo: https://svelte.dev/tutorial/actions

@michaeljelly
Copy link

Hey @sw-yx! Don't know what you had planned for this issue, but I've noticed that this Demo doesn't work on mobile, any ideas why that would be?

@swyxio
Copy link
Owner Author

swyxio commented Jun 28, 2021

no idea, i just copied it straight from the official tutorial..

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

2 participants