Fix crop setting

pull/1530/head
Piero Toffanin 2024-07-29 15:07:50 -04:00
rodzic cacfeccc05
commit 47a1a26cf1
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -360,7 +360,7 @@ class EditTaskForm extends React.Component {
const poly = this.props.getCropPolygon(); const poly = this.props.getCropPolygon();
if (poly && optionNames['crop'] && optionNames['boundary']){ if (poly && optionNames['crop'] && optionNames['boundary']){
let cropOpt = optsCopy.find(opt => opt.name === 'crop'); let cropOpt = optsCopy.find(opt => opt.name === 'crop');
if (!cropOpt) optsCopy.push({name: 'crop', value: 0}); if (!cropOpt) optsCopy.push({name: 'crop', value: "0"});
let boundaryOpt = optsCopy.find(opt => opt.name === 'boundary'); let boundaryOpt = optsCopy.find(opt => opt.name === 'boundary');
if (!boundaryOpt) optsCopy.push({name: 'boundary', value: JSON.stringify(poly)}); if (!boundaryOpt) optsCopy.push({name: 'boundary', value: JSON.stringify(poly)});