Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onObjectAdded event not triggered #120

Open
sonnyky opened this issue Oct 14, 2020 · 2 comments
Open

onObjectAdded event not triggered #120

sonnyky opened this issue Oct 14, 2020 · 2 comments

Comments

@sonnyky
Copy link

sonnyky commented Oct 14, 2020

I'm trying to find a way to trigger an event after drawing an object.
I saw that there are onObjectAdded and also onMouseUp events being defined but neither of these are working.

<SketchField onObjectAdded={this.onBoundingBox} />

this also does not fire the event:

<SketchField onMouseUp={this.onBoundingBox} />

The content of this.onBoundingBox is just a console.log for now.
But this works with onChange.
I'm wondering if I did something wrong or if this is an issue? Do you have any examples of how to use the events?

@nakusyat
Copy link

nakusyat commented Nov 12, 2020

@sonnyky , apparently, the npm package was not updated with the latest changes. Have tried to use https://www.npmjs.com/package/react-sketch2 which seems to be created due the same issues as in our case, the package handles onObjectAdded, etc. events

@sonnyky
Copy link
Author

sonnyky commented Nov 15, 2020

@nakusyat
Thank you for the info. I'll give it a try this week and report how it goes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants