-
-
Notifications
You must be signed in to change notification settings - Fork 418
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
New listener for tools #89
Comments
Hello, var myTool = {
"name": "MyNewTool",
"shortcut": "m",
"listeners": {
"press": startLine,
"move": continueLine,
"release": stopLineAt,
},
"compiledListeners": {
"dblclick": myListener
}, ... For hover, I would use the existing move listener, though. See for instance the eraser. The relevant part of the code you may want to read is here : https://github.com/lovasoa/whitebophir/blob/master/client-data/js/board.js#L497-L513 edit : fixed example. The property name is |
Hello, thank you for your response, I added 'click' listener to the tool, but when I click after selecting the tool, even listener is not triggered. |
If you publish your fork, I'll have a look at it if you want. |
function myListener(){ |
It should be compiledListeners not computedListeners |
Oh, I see. I wrote the right name in my message above, but made a mistake in the example. |
Hi Team,
I was going through code for each tool in the app, right now the listeners available for each tool are press, move and release. Can I add new listeners like click or db click or hover etc to the existing code.
It'll be helpful if you can help me on this.
The text was updated successfully, but these errors were encountered: