Remove opt_ prefix

This commit is contained in:
Tim Schaub
2022-08-11 17:46:31 -06:00
committed by Tim Schaub
parent dd1edc37ca
commit 99612e7f9a
183 changed files with 1918 additions and 2079 deletions
+10 -12
View File
@@ -74,12 +74,12 @@ import {listen, unlistenByKey} from './events.js';
*/
class Feature extends BaseObject {
/**
* @param {Geometry|ObjectWithGeometry<Geometry>} [opt_geometryOrProperties]
* @param {Geometry|ObjectWithGeometry<Geometry>} [geometryOrProperties]
* You may pass a Geometry object directly, or an object literal containing
* properties. If you pass an object literal, you may include a Geometry
* associated with a `geometry` key.
*/
constructor(opt_geometryOrProperties) {
constructor(geometryOrProperties) {
super();
/***
@@ -130,17 +130,17 @@ class Feature extends BaseObject {
this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);
if (opt_geometryOrProperties) {
if (geometryOrProperties) {
if (
typeof (
/** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry
/** @type {?} */ (geometryOrProperties).getSimplifiedGeometry
) === 'function'
) {
const geometry = /** @type {Geometry} */ (opt_geometryOrProperties);
const geometry = /** @type {Geometry} */ (geometryOrProperties);
this.setGeometry(geometry);
} else {
/** @type {Object<string, *>} */
const properties = opt_geometryOrProperties;
const properties = geometryOrProperties;
this.setProperties(properties);
}
}
@@ -265,15 +265,13 @@ class Feature extends BaseObject {
* single style object, an array of styles, or a function that takes a
* resolution and returns an array of styles. To unset the feature style, call
* `setStyle()` without arguments or a falsey value.
* @param {import("./style/Style.js").StyleLike} [opt_style] Style for this feature.
* @param {import("./style/Style.js").StyleLike} [style] Style for this feature.
* @api
* @fires module:ol/events/Event~BaseEvent#event:change
*/
setStyle(opt_style) {
this.style_ = opt_style;
this.styleFunction_ = !opt_style
? undefined
: createStyleFunction(opt_style);
setStyle(style) {
this.style_ = style;
this.styleFunction_ = !style ? undefined : createStyleFunction(style);
this.changed();
}