Replies: 1 comment 3 replies
-
That's a pretty slick demo. It could be a handy utility. My gut reaction is I that don't want to commit to owning what's effectively a Hammer.js equivalent, but then again I haven't compared them side by side to see the differences (size, functionality, etc.). Is the code in |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @claviska,
what do you think about having a component that can handle gestures?
I did a few attempts to add the ability to slide the months in the
sl-datepicker
component using the gestures. The code worked, but I decided to move all the logic outside, in a new component that could handle more gestures, and can be shared with other components.This new
sl-gesture
component can be used by other components to handle the following gestures:I also worked on another component that works closely with the above component. This other new component is called
sl-transform
, and is able to reflect all the CSS transformations generated from thesl-gesture
component.I shared a sandbox https://y1k8s.csb.app code that explains better when I just said. The code can also be tried on a desktop platform, as it uses a touch emulator. Hold SHIFT + mouse to emulate two fingers.
Beta Was this translation helpful? Give feedback.
All reactions