-
Notifications
You must be signed in to change notification settings - Fork 432
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
Update typescript definitions #791
Conversation
Merge develop into Master Release 2.9.0
Update fa.json
Revert "Update fa.json"
@hoetmaaiers can you please resolve the merge conflict and pull the newest develop version? We will create a release this week and it would be nice to have this PR in |
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.
Maybe you want to update this changes but it is not necessary to merge this PR
| 'Line' | ||
| 'Rectangle' | ||
| 'Polygon' | ||
| 'Cut'; |
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.
Please add CircleMarker
Is ImageOverlay missing here? They are only editable not drawable
|
||
export type GEOMAN_MAP_DRAG_MODE_EVENTS = 'pm:globaldrawmodetoggled'; | ||
|
||
export type GEOMAN_MAP_REMOVAL_MODE_EVENTS = 'pm:globalremovalmodetoggled'; |
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.
globaldrawmodetoggled
is missing
|
||
export type GEOMAN_MAP_EDIT_MODE_EVENTS = 'pm:globaleditmodetoggled'; | ||
|
||
export type GEOMAN_MAP_DRAG_MODE_EVENTS = 'pm:globaldrawmodetoggled'; |
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.
export type GEOMAN_MAP_DRAG_MODE_EVENTS = 'pm:globaldrawmodetoggled'; | |
export type GEOMAN_MAP_DRAG_MODE_EVENTS = 'pm:globaldragmodetoggled'; |
export type GEOMAN_LAYER_EDIT_MODE_EVENTS = | ||
| 'pm:edit' | ||
| 'pm:vertexadded' | ||
| 'pm:vertexremoved' | ||
| 'pm:markerdragstart' | ||
| 'pm:markerdragend' | ||
| 'pm:snap' | ||
| 'pm:unsnap' | ||
| 'pm:intersect' | ||
| 'pm:centerplaced'; |
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.
export type GEOMAN_LAYER_EDIT_MODE_EVENTS = | |
| 'pm:edit' | |
| 'pm:vertexadded' | |
| 'pm:vertexremoved' | |
| 'pm:markerdragstart' | |
| 'pm:markerdragend' | |
| 'pm:snap' | |
| 'pm:unsnap' | |
| 'pm:intersect' | |
| 'pm:centerplaced'; | |
export type GEOMAN_LAYER_EDIT_MODE_EVENTS = | |
| 'pm:edit' | |
| 'pm:update' | |
| 'pm:enable' | |
| 'pm:disable' | |
| 'pm:vertexadded' | |
| 'pm:vertexremoved' | |
| 'pm:vertexclick' | |
| 'pm:markerdragstart' | |
| 'pm:markerdrag' | |
| 'pm:markerdragend' | |
| 'pm:layerrest' | |
| 'pm:snapdrag' | |
| 'pm:snap' | |
| 'pm:unsnap' | |
| 'pm:intersect' | |
| 'pm:centerplaced'; |
| 'pm:dragend'; | ||
|
||
export type GEOMAN_LAYER_CUT_MODE_EVENTS = 'pm:cut'; | ||
|
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.
https://github.com/geoman-io/leaflet-geoman/tree/develop#removal-mode
Removal Mode is missing pm:remove
export class LayerDrawOptions { | ||
snappable?: boolean; | ||
snapDistance?: number; | ||
allowSelfIntersection?: boolean; | ||
preventMarkerRemoval?: boolean; |
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.
export class LayerDrawOptions { | |
snappable?: boolean; | |
snapDistance?: number; | |
allowSelfIntersection?: boolean; | |
preventMarkerRemoval?: boolean; | |
export class LayerDrawOptions { | |
snappable?: boolean; | |
snapDistance?: number; | |
allowSelfIntersection?: boolean; | |
allowSelfIntersectionEdit?: boolean; | |
preventMarkerRemoval?: boolean; | |
removeLayerBelowMinVertexCount?: boolean; | |
limitMarkersToCount?: number; | |
limitMarkersToZoom?: number; | |
limitMarkersToViewport?: boolean; | |
limitMarkersToClick?: boolean; | |
pinning?: boolean; |
Maybe this should named EditOptions
because it is for edit mode
lang: | ||
| 'en' | ||
| 'de' | ||
| 'it' | ||
| 'ru' | ||
| 'ro' | ||
| 'es' | ||
| 'fr' | ||
| 'pt_br' | ||
| 'zh' | ||
| 'nl', |
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.
lang: | |
| 'en' | |
| 'de' | |
| 'it' | |
| 'ru' | |
| 'ro' | |
| 'es' | |
| 'fr' | |
| 'pt_br' | |
| 'zh' | |
| 'nl', | |
lang: | |
| 'da' | |
| 'de' | |
| 'el' | |
| 'en' | |
| 'es' | |
| 'fa' | |
| 'fr' | |
| 'hu' | |
| 'id' | |
| 'it' | |
| 'nl' | |
| 'no' | |
| 'pl' | |
| 'pt_br' | |
| 'ro' | |
| 'ru' | |
| 'sv' | |
| 'tr' | |
| 'ua' | |
| 'zh' | |
| 'zh_tw'; |
| 'pm:dragend'; | ||
|
||
export type GEOMAN_LAYER_CUT_MODE_EVENTS = 'pm:cut'; | ||
|
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.
pm:langchange
is missing
https://github.com/geoman-io/leaflet-geoman/tree/develop#customize-language
| 'pm:dragend'; | ||
|
||
export type GEOMAN_LAYER_CUT_MODE_EVENTS = 'pm:cut'; | ||
|
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.
pm:buttonclick
and pm:actionclick
are missing
https://github.com/geoman-io/leaflet-geoman/tree/develop#actions
export class DrawControlOptions { | ||
position?: ControlPosition; | ||
drawMarker?: boolean; | ||
drawCircleMarker?: boolean; | ||
drawPolyline?: boolean; | ||
drawRectangle?: boolean; | ||
drawPolygon?: boolean; | ||
drawCircle?: boolean; | ||
editMode?: boolean; | ||
dragMode?: boolean; | ||
cutPolygon?: boolean; | ||
removalMode?: boolean; |
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.
updated in current develop version
interface LayerOptions { | ||
pmIgnore?: boolean | ||
interface Map { | ||
addControls(options?: DrawControlOptions): void; |
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.
- controlsVisible()
- globalCutModeEnabled
- enableGlobalCutMode
- toggleGlobalCutMode
- disableGlobalCutMode
- globalEditModeEnabled
- enableGlobalDragMode
- disableGlobalDragMode
- globalDragModeEnabled
- toggleGlobalDragMode
- enableGlobalRemovalMode
- disableGlobalRemovalMode
- globalRemovalModeEnabled
- toggleGlobalRemovalMode
|
||
interface MapOptions { | ||
pmIgnore?: boolean; | ||
} |
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.
Interface PM
- reInitLayer()
- setOptIn
Closing this one in favor of #825 |
I have added my local typescript definitions to match the documation and my own usage. This is far from complete but just an update for my current project.
Referring: #790
The event system is harder to type and is added in comment. Any help is surely welcome.