mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Add missing types for module 'ol/interaction/extent' for openlayers@4.6.5
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
import * as ol from 'openlayers';
|
||||
|
||||
export default ol.interaction.Extent;
|
||||
Vendored
+78
@@ -5349,6 +5349,76 @@ export namespace interaction {
|
||||
static createRegularPolygon(opt_sides?: number, opt_angle?: number): ol.DrawGeometryFunctionType;
|
||||
}
|
||||
|
||||
namespace Extent {
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link ol.interaction.Extent} instances are instances of
|
||||
* this type.
|
||||
*
|
||||
* @param extent the new extent
|
||||
*/
|
||||
class Event extends events.Event {
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link ol.interaction.Extent} instances are instances of
|
||||
* this type.
|
||||
*
|
||||
* @param type Type.
|
||||
* @param feature The feature drawn.
|
||||
*/
|
||||
constructor(type: ExtentEventType, extent: ol.Extent);
|
||||
|
||||
/**
|
||||
* The current extent.
|
||||
* @api stable
|
||||
*/
|
||||
extent: ol.Extent;
|
||||
}
|
||||
}
|
||||
|
||||
type ExtentEventType = string;
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Interaction for drawing feature geometries.
|
||||
*
|
||||
* @fires ol.interaction.DrawEvent
|
||||
* @param options Options.
|
||||
* @api stable
|
||||
*/
|
||||
class Extent extends Pointer {
|
||||
/**
|
||||
* @classdesc
|
||||
* Interaction for drawing feature geometries.
|
||||
*
|
||||
* @fires ol.interaction.DrawEvent
|
||||
* @param options Options.
|
||||
* @api stable
|
||||
*/
|
||||
constructor(options: olx.interaction.ExtentOptions);
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
setMap(map: ol.Map): void;
|
||||
|
||||
/**
|
||||
* Returns the current drawn extent in the view projection
|
||||
*
|
||||
* @return Drawn extent in the view projection.
|
||||
* @api
|
||||
*/
|
||||
getExtent(): ol.Extent;
|
||||
|
||||
/**
|
||||
* Manually sets the drawn extent, using the view projection.
|
||||
*
|
||||
* @param extent Extent
|
||||
* @api
|
||||
*/
|
||||
setExtent(extent: ol.Extent): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set of interactions included in maps by default. Specific interactions can be
|
||||
* excluded by setting the appropriate option to false in the constructor
|
||||
@@ -11788,6 +11858,14 @@ export namespace olx {
|
||||
wrapX?: boolean;
|
||||
}
|
||||
|
||||
interface ExtentOptions {
|
||||
extent?: ol.Extent;
|
||||
boxStyle?: (ol.style.Style | ol.style.Style[] | ol.StyleFunction);
|
||||
pixelTolerance?: number;
|
||||
pointerStyle?: (ol.style.Style | ol.style.Style[] | ol.StyleFunction);
|
||||
wrapX?: boolean;
|
||||
}
|
||||
|
||||
interface TranslateOptions {
|
||||
features?: ol.Collection<ol.Feature>;
|
||||
layers?: (ol.layer.Layer[] | ((layer: ol.layer.Layer) => boolean));
|
||||
|
||||
Reference in New Issue
Block a user