terra-draw 1.12.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ import { TerraDrawPolygonMode } from "./modes/polygon/polygon.mode";
11
11
  import { TerraDrawRectangleMode } from "./modes/rectangle/rectangle.mode";
12
12
  import { TerraDrawRenderMode } from "./modes/render/render.mode";
13
13
  import { TerraDrawSelectMode } from "./modes/select/select.mode";
14
- import { FeatureId, GeoJSONStoreFeatures, GeoJSONStoreGeometries, IdStrategy, StoreValidation } from "./store/store";
14
+ import { FeatureId, GeoJSONStoreFeatures, GeoJSONStoreGeometries, IdStrategy, JSON, StoreValidation } from "./store/store";
15
15
  import { BehaviorConfig } from "./modes/base.behavior";
16
16
  import { Position } from "geojson";
17
17
  import { ValidateMinAreaSquareMeters } from "./validations/min-size.validation";
@@ -165,6 +165,20 @@ declare class TerraDraw {
165
165
  * @returns a boolean determining if the instance has a feature with the given id
166
166
  */
167
167
  hasFeature(id: FeatureId): boolean;
168
+ /**
169
+ * Checks if a property name is reserved and cannot be used.
170
+ * @param propertyName - the property name to check
171
+ * @returns
172
+ */
173
+ private checkIsReservedProperty;
174
+ /**
175
+ * Updates a features properties. This can be used to programmatically change the properties of a feature.
176
+ * The update is a shallow merge so only the properties you provide will be updated. Certain internal properties
177
+ * are reserved and cannot be updated.
178
+ * @param id - the id of the feature to update the property for
179
+ * @param properties - an object of key value pairs that will be shallowly merged in to the features properties
180
+ */
181
+ updateFeatureProperties(id: FeatureId, properties: Record<string, JSON | undefined>): void;
168
182
  /**
169
183
  * Updates a features geometry. This an be used to programmatically change the coordinates of a feature. This
170
184
  * can be useful for if you want to modify a geometry via a button or some similar user interaction.