generated from Tahul/vue-composable-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I would like to be able to access the original domElement that the handler has been attached to inside gesture callbacks.
The use case would be (simplified code):
<script setup>
// Quick drag-to-scroll implementation
function handleDrag({ domElement, delta: [x, y] }) {
domElement.scrollBy(-x, -y)
}
</script>
<template>
<div v-drag="handleDrag">
<div>child</div>
<div>child</div>
</div>
</template>I realize I can work around this with an additional ref or even with a custom directive (as I did), my point here being reducing boilerplate for simpler ad-hoc code.
Metadata
Metadata
Assignees
Labels
No labels