terra-draw 0.0.1-alpha.69 → 0.0.1-alpha.70
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/dist/geometry/get-midpoints.d.ts +9 -3
- package/dist/geometry/measure/bearing.d.ts +7 -0
- package/dist/geometry/midpoint-coordinate.d.ts +1 -0
- package/dist/geometry/transform/rotate.d.ts +8 -1
- package/dist/geometry/transform/scale.d.ts +7 -0
- package/dist/geometry/web-mercator-centroid.d.ts +11 -0
- package/dist/modes/base.behavior.d.ts +4 -2
- package/dist/modes/base.mode.d.ts +3 -1
- package/dist/modes/circle/circle.mode.d.ts +0 -1
- package/dist/modes/linestring/linestring.mode.d.ts +1 -3
- package/dist/modes/select/behaviors/drag-coordinate-resize.behavior.d.ts +2 -2
- package/dist/terra-draw.cjs +1 -1
- package/dist/terra-draw.cjs.map +1 -1
- package/dist/terra-draw.d.ts +19 -19
- 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/tests/leaflet.spec.ts +167 -153
- package/e2e/tests/setup.ts +12 -3
- package/package.json +3 -3
- package/dist/geometry/web-mercator-center.d.ts +0 -5
package/dist/terra-draw.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ declare class TerraDraw {
|
|
|
57
57
|
* @param styles - The styles you wish to set for the mode - this is
|
|
58
58
|
* the same as the initialisation style schema
|
|
59
59
|
*
|
|
60
|
-
* @
|
|
60
|
+
* @beta
|
|
61
61
|
*/
|
|
62
62
|
setModeStyles<Styling extends Record<string, number | HexColor>>(mode: string, styles: Styling): void;
|
|
63
63
|
/**
|
|
@@ -65,14 +65,14 @@ declare class TerraDraw {
|
|
|
65
65
|
*
|
|
66
66
|
* @returns An array of all given Feature Geometries in the instances store
|
|
67
67
|
*
|
|
68
|
-
* @
|
|
68
|
+
* @beta
|
|
69
69
|
*/
|
|
70
70
|
getSnapshot(): GeoJSONStoreFeatures[];
|
|
71
71
|
/**
|
|
72
72
|
* Removes all data from the current store and removes any rendered layers
|
|
73
73
|
* via the registering the adapter.
|
|
74
74
|
*
|
|
75
|
-
* @
|
|
75
|
+
* @beta
|
|
76
76
|
*/
|
|
77
77
|
clear(): void;
|
|
78
78
|
/**
|
|
@@ -82,13 +82,13 @@ declare class TerraDraw {
|
|
|
82
82
|
*
|
|
83
83
|
* @return true or false depending on if the instance is stopped or started
|
|
84
84
|
* @readonly
|
|
85
|
-
* @
|
|
85
|
+
* @beta
|
|
86
86
|
*/
|
|
87
87
|
get enabled(): boolean;
|
|
88
88
|
/**
|
|
89
89
|
* enabled is a read only property and will throw and error if you try and set it.
|
|
90
90
|
*
|
|
91
|
-
* @
|
|
91
|
+
* @beta
|
|
92
92
|
*/
|
|
93
93
|
set enabled(_: boolean);
|
|
94
94
|
/**
|
|
@@ -96,7 +96,7 @@ declare class TerraDraw {
|
|
|
96
96
|
*
|
|
97
97
|
* @return the current mode name
|
|
98
98
|
*
|
|
99
|
-
* @
|
|
99
|
+
* @beta
|
|
100
100
|
*/
|
|
101
101
|
getMode(): string;
|
|
102
102
|
/**
|
|
@@ -104,7 +104,7 @@ declare class TerraDraw {
|
|
|
104
104
|
* the previous mode and start the new one.
|
|
105
105
|
* @param mode - The mode name you wish to start
|
|
106
106
|
*
|
|
107
|
-
* @
|
|
107
|
+
* @beta
|
|
108
108
|
*/
|
|
109
109
|
setMode(mode: string): void;
|
|
110
110
|
/**
|
|
@@ -112,7 +112,7 @@ declare class TerraDraw {
|
|
|
112
112
|
* @param ids
|
|
113
113
|
* @returns
|
|
114
114
|
*
|
|
115
|
-
* @
|
|
115
|
+
* @beta
|
|
116
116
|
*/
|
|
117
117
|
removeFeatures(ids: FeatureId[]): void;
|
|
118
118
|
/**
|
|
@@ -120,7 +120,7 @@ declare class TerraDraw {
|
|
|
120
120
|
* If not select mode is provided in the instance, an error will be thrown. If the instance is not currently
|
|
121
121
|
* in the select mode, it will switch to it.
|
|
122
122
|
* @param id - the id of the feature to select
|
|
123
|
-
* @
|
|
123
|
+
* @beta
|
|
124
124
|
*/
|
|
125
125
|
selectFeature(id: FeatureId): void;
|
|
126
126
|
/**
|
|
@@ -128,7 +128,7 @@ declare class TerraDraw {
|
|
|
128
128
|
* If not select mode is provided in the instance, an error will be thrown. If the instance is not currently
|
|
129
129
|
* in the select mode, it will switch to it.
|
|
130
130
|
* @param id - the id of the feature to deselect
|
|
131
|
-
* @
|
|
131
|
+
* @beta
|
|
132
132
|
*/
|
|
133
133
|
deselectFeature(id: FeatureId): void;
|
|
134
134
|
/**
|
|
@@ -137,14 +137,14 @@ declare class TerraDraw {
|
|
|
137
137
|
* outside of the Terra Draw instance but want to add them in to the store.
|
|
138
138
|
* @returns a id, either number of string based on whatever the configured idStrategy is
|
|
139
139
|
*
|
|
140
|
-
* @
|
|
140
|
+
* @beta
|
|
141
141
|
*/
|
|
142
142
|
getFeatureId(): FeatureId;
|
|
143
143
|
/**
|
|
144
144
|
* Returns true or false depending on if the Terra Draw instance has a feature with a given id
|
|
145
145
|
* @returns a boolean determining if the instance has a feature with the given id
|
|
146
146
|
*
|
|
147
|
-
* @
|
|
147
|
+
* @beta
|
|
148
148
|
*/
|
|
149
149
|
hasFeature(id: FeatureId): boolean;
|
|
150
150
|
/**
|
|
@@ -154,14 +154,14 @@ declare class TerraDraw {
|
|
|
154
154
|
* @param features
|
|
155
155
|
* @returns
|
|
156
156
|
*
|
|
157
|
-
* @
|
|
157
|
+
* @beta
|
|
158
158
|
*/
|
|
159
159
|
addFeatures(features: GeoJSONStoreFeatures[]): void;
|
|
160
160
|
/**
|
|
161
161
|
* A method starting Terra Draw. It put the instance into a started state, and
|
|
162
162
|
* in registers the passed adapter giving it all the callbacks required to operate.
|
|
163
163
|
*
|
|
164
|
-
* @
|
|
164
|
+
* @beta
|
|
165
165
|
*/
|
|
166
166
|
start(): void;
|
|
167
167
|
/**
|
|
@@ -169,7 +169,7 @@ declare class TerraDraw {
|
|
|
169
169
|
* Will return point and linestrings that are a given pixel distance
|
|
170
170
|
* away from the lng/lat and any polygons which contain it.
|
|
171
171
|
*
|
|
172
|
-
* @
|
|
172
|
+
* @beta
|
|
173
173
|
*/
|
|
174
174
|
getFeaturesAtLngLat(lngLat: {
|
|
175
175
|
lng: number;
|
|
@@ -183,7 +183,7 @@ declare class TerraDraw {
|
|
|
183
183
|
* Will return point and linestrings that are a given pixel distance
|
|
184
184
|
* away from the lng/lat and any polygons which contain it.
|
|
185
185
|
*
|
|
186
|
-
* @
|
|
186
|
+
* @beta
|
|
187
187
|
*/
|
|
188
188
|
getFeaturesAtPointerEvent(event: PointerEvent | MouseEvent, options?: {
|
|
189
189
|
pointerDistance: number;
|
|
@@ -193,7 +193,7 @@ declare class TerraDraw {
|
|
|
193
193
|
* A method for stopping Terra Draw. Will clear the store, deregister the adapter and
|
|
194
194
|
* remove any rendered layers in the process.
|
|
195
195
|
*
|
|
196
|
-
* @
|
|
196
|
+
* @beta
|
|
197
197
|
*/
|
|
198
198
|
stop(): void;
|
|
199
199
|
/**
|
|
@@ -202,7 +202,7 @@ declare class TerraDraw {
|
|
|
202
202
|
* @param event - The name of the event you wish to listen for
|
|
203
203
|
* @param callback - The callback with you wish to be called when this event occurs
|
|
204
204
|
*
|
|
205
|
-
* @
|
|
205
|
+
* @beta
|
|
206
206
|
*/
|
|
207
207
|
on<T extends TerraDrawEvents>(event: T, callback: TerraDrawEventListeners[T]): void;
|
|
208
208
|
/**
|
|
@@ -211,7 +211,7 @@ declare class TerraDraw {
|
|
|
211
211
|
* @param event - The name of the event you wish to unregister
|
|
212
212
|
* @param callback - The callback you originally provided to the 'on' method
|
|
213
213
|
*
|
|
214
|
-
* @
|
|
214
|
+
* @beta
|
|
215
215
|
*/
|
|
216
216
|
off<T extends TerraDrawEvents>(event: TerraDrawEvents, callback: TerraDrawEventListeners[T]): void;
|
|
217
217
|
}
|