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.
- package/README.md +7 -5
- package/dist/adapters/leaflet.adapter.d.ts +2 -1
- package/dist/adapters/mapbox-gl.adapter.d.ts +2 -1
- package/dist/adapters/openlayers.adapter.d.ts +2 -1
- package/dist/common.d.ts +1 -0
- package/dist/modes/base.mode.d.ts +5 -0
- package/dist/modes/select/behaviors/drag-coordinate-resize.behavior.d.ts +8 -2
- package/dist/modes/select/select.mode.d.ts +6 -4
- package/dist/terra-draw.cjs +1 -1
- package/dist/terra-draw.cjs.map +1 -1
- package/dist/terra-draw.d.ts +18 -0
- package/dist/terra-draw.modern.js +1 -1
- package/dist/terra-draw.modern.js.map +1 -1
- package/dist/terra-draw.module.js +1 -1
- package/dist/terra-draw.module.js.map +1 -1
- package/dist/terra-draw.umd.js +1 -1
- package/dist/terra-draw.umd.js.map +1 -1
- package/e2e/src/index.ts +1 -1
- package/package.json +1 -1
package/dist/terra-draw.d.ts
CHANGED
|
@@ -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
|