Fix some types
This commit is contained in:
@@ -40,7 +40,7 @@ import {createEditingStyle} from '../style/Style.js';
|
||||
* on touch devices.
|
||||
* @property {module:ol/Collection.<module:ol/Feature>} [features]
|
||||
* Destination collection for the drawn features.
|
||||
* @property {module:ol/source/Vector~Vector} [source] Destination source for
|
||||
* @property {module:ol/source/Vector} [source] Destination source for
|
||||
* the drawn features.
|
||||
* @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown
|
||||
* before the current vertex can be dragged to its exact position.
|
||||
@@ -57,7 +57,7 @@ import {createEditingStyle} from '../style/Style.js';
|
||||
* @property {module:ol/events/condition~Condition} [finishCondition] A function
|
||||
* that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
|
||||
* boolean to indicate whether the drawing can be finished.
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction} [style]
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function} [style]
|
||||
* Style for sketch features.
|
||||
* @property {module:ol/interaction/Draw~GeometryFunction} [geometryFunction]
|
||||
* Function that is called when a geometry's coordinates are updated.
|
||||
@@ -201,7 +201,7 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Target source for drawn features.
|
||||
* @type {module:ol/source/Vector~Vector}
|
||||
* @type {module:ol/source/Vector}
|
||||
* @private
|
||||
*/
|
||||
this.source_ = options.source ? options.source : null;
|
||||
@@ -437,7 +437,7 @@ inherits(Draw, PointerInteraction);
|
||||
|
||||
|
||||
/**
|
||||
* @return {module:ol/style~StyleFunction} Styles.
|
||||
* @return {module:ol/style/Style~Function} Styles.
|
||||
*/
|
||||
function getDefaultStyleFunction() {
|
||||
const styles = createEditingStyle();
|
||||
|
||||
@@ -21,12 +21,12 @@ import {createEditingStyle} from '../style/Style.js';
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/extent~Extent} [extent] Initial extent. Defaults to no
|
||||
* initial extent.
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction} [boxStyle]
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function} [boxStyle]
|
||||
* Style for the drawn extent box. Defaults to
|
||||
* {@link module:ol/style/Style~createEditing()['Polygon']}
|
||||
* @property {number} [pixelTolerance=10] Pixel tolerance for considering the
|
||||
* pointer close enough to a segment or vertex for editing.
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction} [pointerStyle]
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function} [pointerStyle]
|
||||
* Style for the cursor used to draw the extent. Defaults to
|
||||
* {@link module:ol/style/Style~createEditing()['Point']}
|
||||
* @property {boolean} [wrapX=false] Wrap the drawn extent across multiple maps
|
||||
@@ -288,7 +288,7 @@ function handleUpEvent(mapBrowserEvent) {
|
||||
/**
|
||||
* Returns the default style for the drawn bbox
|
||||
*
|
||||
* @return {module:ol/style~StyleFunction} Default Extent style
|
||||
* @return {module:ol/style/Style~Function} Default Extent style
|
||||
*/
|
||||
function getDefaultExtentStyleFunction() {
|
||||
const style = createEditingStyle();
|
||||
@@ -300,7 +300,7 @@ function getDefaultExtentStyleFunction() {
|
||||
/**
|
||||
* Returns the default style for the pointer
|
||||
*
|
||||
* @return {module:ol/style~StyleFunction} Default pointer style
|
||||
* @return {module:ol/style/Style~Function} Default pointer style
|
||||
*/
|
||||
function getDefaultPointerStyleFunction() {
|
||||
const style = createEditingStyle();
|
||||
|
||||
@@ -72,10 +72,10 @@ const ModifyEventType = {
|
||||
* features. Default is {@link module:ol/events/condition~always}.
|
||||
* @property {number} [pixelTolerance=10] Pixel tolerance for considering the
|
||||
* pointer close enough to a segment or vertex for editing.
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction} [style]
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function} [style]
|
||||
* Style used for the features being modified. By default the default edit
|
||||
* style is used (see {@link module:ol/style}).
|
||||
* @property {module:ol/source/Vector~Vector} [source] The vector source with
|
||||
* @property {module:ol/source/Vector} [source] The vector source with
|
||||
* features to modify. If a vector source is not provided, a feature collection
|
||||
* must be provided with the features option.
|
||||
* @property {module:ol/Collection.<module:ol/Feature>} [features]
|
||||
@@ -283,7 +283,7 @@ const Modify = function(options) {
|
||||
|
||||
|
||||
/**
|
||||
* @type {module:ol/source/Vector~Vector}
|
||||
* @type {module:ol/source/Vector}
|
||||
* @private
|
||||
*/
|
||||
this.source_ = null;
|
||||
@@ -1267,7 +1267,7 @@ Modify.prototype.updateSegmentIndices_ = function(
|
||||
|
||||
|
||||
/**
|
||||
* @return {module:ol/style~StyleFunction} Styles.
|
||||
* @return {module:ol/style/Style~Function} Styles.
|
||||
*/
|
||||
function getDefaultStyleFunction() {
|
||||
const style = createEditingStyle();
|
||||
|
||||
@@ -31,7 +31,7 @@ const SelectEventType = {
|
||||
|
||||
/**
|
||||
* A function that takes an {@link module:ol/Feature} or
|
||||
* {@link module:ol/render/Feature~Feature} and an
|
||||
* {@link module:ol/render/Feature} and an
|
||||
* {@link module:ol/layer/Layer} and returns `true` if the feature may be
|
||||
* selected or `false` otherwise.
|
||||
* @typedef {function((module:ol/Feature|module:ol/render/Feature), module:ol/layer/Layer):
|
||||
@@ -61,7 +61,7 @@ const SelectEventType = {
|
||||
* in the map and should return `true` for layers that you want to be
|
||||
* selectable. If the option is absent, all visible layers will be considered
|
||||
* selectable.
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style~StyleFunction} [style]
|
||||
* @property {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function} [style]
|
||||
* Style for the selected features. By default the default edit style is used
|
||||
* (see {@link module:ol/style}).
|
||||
* @property {module:ol/events/condition~Condition} [removeCondition] A function
|
||||
@@ -441,7 +441,7 @@ Select.prototype.setMap = function(map) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {module:ol/style~StyleFunction} Styles.
|
||||
* @return {module:ol/style/Style~Function} Styles.
|
||||
*/
|
||||
function getDefaultStyleFunction() {
|
||||
const styles = createEditingStyle();
|
||||
|
||||
@@ -40,14 +40,14 @@ import RBush from '../structs/RBush.js';
|
||||
* @property {boolean} [vertex=true] Snap to vertices.
|
||||
* @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or
|
||||
* vertex for snapping.
|
||||
* @property {module:ol/source/Vector~Vector} [source] Snap to features from this source. Either this option or features should be provided
|
||||
* @property {module:ol/source/Vector} [source] Snap to features from this source. Either this option or features should be provided
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Handles snapping of vector features while modifying or drawing them. The
|
||||
* features can come from a {@link module:ol/source/Vector~Vector} or {@link module:ol/Collection~Collection}
|
||||
* features can come from a {@link module:ol/source/Vector} or {@link module:ol/Collection~Collection}
|
||||
* Any interaction object that allows the user to interact
|
||||
* with the features using the mouse can benefit from the snapping, as long
|
||||
* as it is added before.
|
||||
@@ -79,7 +79,7 @@ const Snap = function(opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
/**
|
||||
* @type {module:ol/source/Vector~Vector}
|
||||
* @type {module:ol/source/Vector}
|
||||
* @private
|
||||
*/
|
||||
this.source_ = options.source ? options.source : null;
|
||||
@@ -245,7 +245,7 @@ Snap.prototype.getFeatures_ = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/source/Vector~Vector|module:ol/Collection~CollectionEvent} evt Event.
|
||||
* @param {module:ol/source/Vector|module:ol/Collection~CollectionEvent} evt Event.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.handleFeatureAdd_ = function(evt) {
|
||||
@@ -260,7 +260,7 @@ Snap.prototype.handleFeatureAdd_ = function(evt) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/source/Vector~Vector|module:ol/Collection~CollectionEvent} evt Event.
|
||||
* @param {module:ol/source/Vector|module:ol/Collection~CollectionEvent} evt Event.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.handleFeatureRemove_ = function(evt) {
|
||||
|
||||
Reference in New Issue
Block a user