Rename Style~Function path type to Style~StyleFunction
This commit is contained in:
@@ -78,13 +78,13 @@ const Feature = function(opt_geometryOrProperties) {
|
||||
/**
|
||||
* User provided style.
|
||||
* @private
|
||||
* @type {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function}
|
||||
* @type {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~StyleFunction}
|
||||
*/
|
||||
this.style_ = null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/style/Style~Function|undefined}
|
||||
* @type {module:ol/style/Style~StyleFunction|undefined}
|
||||
*/
|
||||
this.styleFunction_ = undefined;
|
||||
|
||||
@@ -177,7 +177,7 @@ Feature.prototype.getGeometryName = function() {
|
||||
/**
|
||||
* Get the feature's style. Will return what was provided to the
|
||||
* {@link module:ol/Feature~Feature#setStyle} method.
|
||||
* @return {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function} The feature style.
|
||||
* @return {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~StyleFunction} The feature style.
|
||||
* @api
|
||||
*/
|
||||
Feature.prototype.getStyle = function() {
|
||||
@@ -187,7 +187,7 @@ Feature.prototype.getStyle = function() {
|
||||
|
||||
/**
|
||||
* Get the feature's style function.
|
||||
* @return {module:ol/style/Style~Function|undefined} Return a function
|
||||
* @return {module:ol/style/Style~StyleFunction|undefined} Return a function
|
||||
* representing the current style of this feature.
|
||||
* @api
|
||||
*/
|
||||
@@ -237,7 +237,7 @@ Feature.prototype.setGeometry = function(geometry) {
|
||||
* Set the style for the feature. This can be a single style object, an array
|
||||
* of styles, or a function that takes a resolution and returns an array of
|
||||
* styles. If it is `null` the feature has no style (a `null` style).
|
||||
* @param {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~Function} style Style for this feature.
|
||||
* @param {module:ol/style/Style|Array.<module:ol/style/Style>|module:ol/style/Style~StyleFunction} style Style for this feature.
|
||||
* @api
|
||||
* @fires module:ol/events/Event~Event#event:change
|
||||
*/
|
||||
@@ -286,9 +286,9 @@ Feature.prototype.setGeometryName = function(name) {
|
||||
* Convert the provided object into a feature style function. Functions passed
|
||||
* through unchanged. Arrays of module:ol/style/Style or single style objects wrapped
|
||||
* in a new feature style function.
|
||||
* @param {module:ol/style/Style~Function|!Array.<module:ol/style/Style>|!module:ol/style/Style} obj
|
||||
* @param {module:ol/style/Style~StyleFunction|!Array.<module:ol/style/Style>|!module:ol/style/Style} obj
|
||||
* A feature style function, a single style, or an array of styles.
|
||||
* @return {module:ol/style/Style~Function} A style function.
|
||||
* @return {module:ol/style/Style~StyleFunction} A style function.
|
||||
*/
|
||||
export function createStyleFunction(obj) {
|
||||
if (typeof obj === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user