react-konva icon indicating copy to clipboard operation
react-konva copied to clipboard

pointerId missing in interface KonvaEventObject<EventType> in Node.d.ts

Open mwegithub opened this issue 2 years ago • 3 comments

I'm new to Konva and I've need to use setPointerCapture() to implement some functionality. I'm using TypeScript, which complains that KonvaEventObject has no member pointerId.

Example Code:

myShape.on('pointerdown', (event) => {
    point.setPointerCapture(event.pointerId);
});

The code works fine after adding the missing pointerId element to KonvaEventObject<EventType> in Node.d.ts.

mwegithub avatar Jun 23 '22 13:06 mwegithub

Do you want to create a Pull Request to fix it?

lavrton avatar Jun 23 '22 18:06 lavrton

I have just started using Konva via NPM. All I did was to append pointerId in Node.d.ts: ''' export interface KonvaEventObject<EventType> { ... pointerId: number; }'''

If you think I should fork, clone and do a pull request for this, I can look into this after my vacation. Do you have a PayPal account for one-time donation? I don't like subscriptions or opening yet another account on Patron or OpenCollective just to send you a small amount of money as an appreciation of your work on Konva.

mwegithub avatar Jun 24 '22 13:06 mwegithub

Yeah https://www.paypal.com/paypalme/AntonLavrenov Thanks for the support.

lavrton avatar Jun 25 '22 14:06 lavrton

Fixed from Konva side. It will be released later.

lavrton avatar Apr 16 '23 01:04 lavrton