mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 13:27:15 +08:00
Add undefined type to ol.Overlay.setPosition
According to the [document of ol.Overlay.setPosition](http://openlayers.org/en/latest/apidoc/ol.Overlay.html#setPosition), set it to undefined makes the popup disappear. However, in the current definition, it doesn't allow to be set to undefined.
This commit is contained in:
6
types/openlayers/index.d.ts
vendored
6
types/openlayers/index.d.ts
vendored
@@ -1,6 +1,8 @@
|
||||
// Type definitions for OpenLayers v4.3.0
|
||||
// Project: http://openlayers.org/
|
||||
// Definitions by: Olivier Sechet <https://github.com/osechet>, Guilhem Brouat <https://github.com/ganlhi>
|
||||
// Definitions by: Olivier Sechet <https://github.com/osechet>
|
||||
// Guilhem Brouat <https://github.com/ganlhi>
|
||||
// Bin Wang <https://github.com/wb14123>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// Definitions partially generated using tsd-jsdoc (https://github.com/englercj/tsd-jsdoc)
|
||||
|
||||
@@ -7597,7 +7599,7 @@ declare module ol {
|
||||
* @observable
|
||||
* @api stable
|
||||
*/
|
||||
setPosition(position: (ol.Coordinate)): void;
|
||||
setPosition(position: (ol.Coordinate | undefined)): void;
|
||||
|
||||
/**
|
||||
* Set the positioning for this overlay.
|
||||
|
||||
@@ -590,6 +590,7 @@ voidValue = popup.setElement(popupElement);
|
||||
voidValue = popup.setMap(popupMap);
|
||||
voidValue = popup.setOffset(popupOffset);
|
||||
voidValue = popup.setPosition(coordinate);
|
||||
voidValue = popup.setPosition(undefined);
|
||||
voidValue = popup.setPositioning(popupPositioning);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user