LiveView and mouse/touch events

Hello!
First of all, I just wanna say I’ve been loving Elixir, Phoenix and LiveView. Thanks so much for the fantastic experience!

Sorry if this has been asked elsewhere. I know this is a pretty basic use case, but I couldn’t find anything substantive.

I’m going to make a dynamic visualization app with panning and zooming functionality through dragging, tapping and pinching. I was wondering to what extent it’s possible/worth using just LiveView (without any client-side JS) to implement it. For instance, for panning, I was thinking of sending mousedown/up/move events to update positions on the server, and use CSS transitions to make the movements look smooth. Still, I’m afraid that even optimistically the movements are going to appear delayed (but I really wish to be proven wrong!).

So, what would you recommend?

Thanks in advance! :slight_smile:

1 Like

Is it ok to bump posts? :slight_smile:
(I couldn’t find anything about it in the forum’s rules, so I apologize if it’s not allowed.)

1 Like

See: Drag & Drop in Phoenix LiveView? (+Custom messages?)

1 Like

Thanks, I’ll take a look at it!