v1.0.3
NippleJS v1.0.3
A small patch release fixing TypeScript event handler overload inference and a multi-manager DOM containment bug. Thanks @akromann for the report and fixes in #245.
🌐 Documentation · 🎮 Interactive Demos · 📦 npm
🐛 Bug Fixes
- Multiple managers couldn't open joysticks simultaneously —
Joystick.start()checkeddocument.body.contains()to decide whether to re-add the element, which returnedtruefor any joystick already mounted anywhere in the DOM. This caused a manager to skip mounting its joystick when another manager already had one active. Now useszone.contains()so each manager checks its own zone. (6418df2) - TypeScript
on()handler type was unusable withoutas any—SuperEventTyperesolved to a union of all possible event payloads instead of narrowing based on the event name, forcing users to cast handlers. Added a generic parameter so the handler type narrows correctly to the matchingEventDataMapentry. (2ff4c51)
Full Changelog: v1.0.2...v1.0.3