dtable-ui-component 6.0.37-beta1 → 6.0.37-beta2
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.
|
@@ -326,6 +326,18 @@ class MapEditor extends _react.default.Component {
|
|
|
326
326
|
this.onClose = () => {
|
|
327
327
|
this.props.onToggle();
|
|
328
328
|
};
|
|
329
|
+
this.getNumericValue = value => {
|
|
330
|
+
const {
|
|
331
|
+
lng,
|
|
332
|
+
lat
|
|
333
|
+
} = value || {};
|
|
334
|
+
const numLng = typeof lng === 'string' ? parseFloat(lng.trim()) : lng;
|
|
335
|
+
const numLat = typeof lat === 'string' ? parseFloat(lat.trim()) : lat;
|
|
336
|
+
return {
|
|
337
|
+
lng: numLng,
|
|
338
|
+
lat: numLat
|
|
339
|
+
};
|
|
340
|
+
};
|
|
329
341
|
this.handleLatitudeChange = value => {
|
|
330
342
|
this.setState({
|
|
331
343
|
value: {
|
|
@@ -333,7 +345,7 @@ class MapEditor extends _react.default.Component {
|
|
|
333
345
|
lat: value
|
|
334
346
|
}
|
|
335
347
|
}, () => {
|
|
336
|
-
const numericValue = this.
|
|
348
|
+
const numericValue = this.getNumericValue(this.state.value);
|
|
337
349
|
this.rerenderMapMarker(numericValue);
|
|
338
350
|
});
|
|
339
351
|
};
|
|
@@ -344,7 +356,7 @@ class MapEditor extends _react.default.Component {
|
|
|
344
356
|
lng: value
|
|
345
357
|
}
|
|
346
358
|
}, () => {
|
|
347
|
-
const numericValue = this.
|
|
359
|
+
const numericValue = this.getNumericValue(this.state.value);
|
|
348
360
|
this.rerenderMapMarker(numericValue);
|
|
349
361
|
});
|
|
350
362
|
};
|