Open IlyaSemenov opened 7 months ago
I would like to be able to access the original domElement that the handler has been attached to inside gesture callbacks.
domElement
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.
ref
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):
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.