pmndrs / react-zdog

⚡️🐶 React bindings for zdog
MIT License
443 stars 21 forks source link

dragRotate not working #14

Closed jacasch closed 4 years ago

jacasch commented 5 years ago

It looks like dragRotate is not working.

this code:

<Illustration zoom={2} dragRotate={true}>
    <Rect width={120} height={80} stroke={10} color="#E62"/>
</Illustration>

gives this error:

illustration.js:233 Uncaught TypeError: Cannot read property 'x' of undefined
  at Item.Illustration.dragStart (illustration.js:233)
  at Item.Dragger.onmousedown.Dragger.onpointerdown (dragger.js:76)
  at Item.Dragger.handleEvent (dragger.js:71)
vzalberto commented 5 years ago

Same here. Funny thing is, it does work on https://codesandbox.io/s/frosty-worker-13f0v

Running local gives me this error message image

drcmda commented 5 years ago

oh it looks like it forwards that one through. could i interest you in a PR? if you depend on this lib i would also share authorship and give push/npm rights. im terribly busy with the other stuff unfortunately.

shahruz commented 4 years ago

Hey, just submitted a pull request with a fix!