-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improve typescript bindings #1369
Conversation
Jamie5
commented
Feb 24, 2021
- Make MapEvent.point/lngLat 2-arrays
- From MjolnirEvent remove deltaX/deltaY/scale/rotation/metaKey which seem like they might not exist, or at least are not in the public API documentation
- From MjolnirEvent make delta/pointerType/rightButton optional, as the API documentation states they are only present for some events
- From MjolnirEvent add stopImmediatePropagation/leftButton/middleButton/key which are supposed to exist per docs
- From MjolnirEvent make typings for stopPropagation/preventDefault/srcEvent more specific
rightButton: boolean, | ||
stopPropagation: Function, | ||
preventDefault: Function, | ||
delta?: number, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are some of the fields deleted? They are accessed in map-controller.js:
- deltaX
- deltaY
- scale
- rotation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm they aren't documented as existing so I wasn't sure if they existed, but given we use them then they certainly do exist. So restored them (but made them optional, because they only exist for some events)
- Make MapEvent.point/lngLat 2-arrays - From MjolnirEvent make deltaX/deltaY/scale/rotation/metaKey optional, as they are undocumented and don't exist for all events - From MjolnirEvent make delta/pointerType/rightButton optional, as the API documentation states they are only present for some events - From MjolnirEvent add stopImmediatePropagation/leftButton/middleButton/key which are supposed to exist per docs - From MjolnirEvent make typings for stopPropagation/preventDefault/srcEvent more specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!