Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3866 → Rev 3867

/trunk/widget/modules/saisie/squelettes/js/tb-geoloc/js/modules/Locality.js
149,8 → 149,6
evt.preventDefault();
 
lthis.places.val($thisSuggestion.text());
 
suggestion.geojson.coordinates = lthis.formatCoordinatesArray(suggestion.geojson);
lthis.clientCallback(suggestion);
lthis.placesCloseButton.trigger('click');
 
176,22 → 174,6
});
};
 
TbPlaces.prototype.formatCoordinatesArray = function(geojson) {
const coordinatesArray = geojson.coordinates,
geojsonType = geojson.type,
coordinatesArrayLength = coordinatesArray.length;
 
if ('Point' === geojsonType) {
coordinatesArray.reverse();
} else if (0 > coordinatesArrayLength) {
for (let i = 0; i <= coordinatesArrayLength; i++) {
coordinatesArray[i].reverse();
}
}
 
return coordinatesArray;
}
 
TbPlaces.prototype.resetOnClick = function () {
const lthis = this;