cocopon / tweakpane

:control_knobs: Compact GUI for fine-tuning parameters and monitoring value changes
https://tweakpane.github.io/docs/
MIT License
3.69k stars 92 forks source link

patch(ButtonApi): patched ".on()" method with missing key property #634

Closed Chlebamaticon closed 1 week ago

Chlebamaticon commented 1 week ago

Problem

ButtonApi does not implement correctly Emitter model since it does wrap handler with arrow function without setting handler key (packages/core/src/blade/api/button.ts). Therefore, using the same handler within .off method to unregister listener basically does not work since reference does not exist - as presented here.

cocopon commented 1 week ago

Thank you for your contribution. Could you resolve a formatting issue by running npm run format?

Chlebamaticon commented 1 week ago

Thank you for your contribution. Could you resolve a formatting issue by running npm run format?

Of course, just did it now and pushed commit.

cocopon commented 1 week ago

Merged, please wait for the next release.