terra-draw 0.0.1-alpha.57 → 0.0.1-alpha.59

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.
@@ -23,6 +23,7 @@ type ChangeListener = (ids: FeatureId[], type: string) => void;
23
23
  type SelectListener = (id: FeatureId) => void;
24
24
  type DeselectListener = () => void;
25
25
  interface TerraDrawEventListeners {
26
+ ready: () => void;
26
27
  finish: FinishListener;
27
28
  change: ChangeListener;
28
29
  select: SelectListener;
@@ -46,6 +47,7 @@ declare class TerraDraw {
46
47
  private checkEnabled;
47
48
  private getModeStyles;
48
49
  private featuresAtLocation;
50
+ private getSelectMode;
49
51
  /**
50
52
  * Allows the setting of a style for a given mode
51
53
  *
@@ -111,6 +113,22 @@ declare class TerraDraw {
111
113
  * @alpha
112
114
  */
113
115
  removeFeatures(ids: FeatureId[]): void;
116
+ /**
117
+ * Provides the ability to programmatically select a feature using the instances provided select mode.
118
+ * If not select mode is provided in the instance, an error will be thrown. If the instance is not currently
119
+ * in the select mode, it will switch to it.
120
+ * @param id - the id of the feature to select
121
+ * @alpha
122
+ */
123
+ selectFeature(id: FeatureId): void;
124
+ /**
125
+ * Provides the ability to programmatically deselect a feature using the instances provided select mode.
126
+ * If not select mode is provided in the instance, an error will be thrown. If the instance is not currently
127
+ * in the select mode, it will switch to it.
128
+ * @param id - the id of the feature to deselect
129
+ * @alpha
130
+ */
131
+ deselectFeature(id: FeatureId): void;
114
132
  /**
115
133
  * Returns the next feature id from the store - defaults to UUID4 unless you have
116
134
  * set a custom idStrategy. This method can be useful if you are needing creating features