peci-g3 / mission-generator

https://peci-g3.github.io/mission-generator/
1 stars 1 forks source link

Bug when editing the coordinates for go-to command, when it's already added to the mission timeline #1

Open jtsimoes opened 2 years ago

jtsimoes commented 2 years ago

Suppose we add/drag a go-to command to the mission timeline, but then we want to change the coordinates where we want to move the drone to.

When clicking on the coordinates <input> to change them, the map pop-up appears correctly, but when we click on the new coordinates on the map to set them, the <input> that is changed is the one of the replenished go-to command in the list of available commands, not the <input> of the command we clicked on (the one on the mission timeline).

The one on the mission timeline keeps it's original coordinates.

testing

jtsimoes commented 2 years ago

I've found that it's this selector that is causing the issue:

https://github.com/peci-g3/mission-generator/blob/c14c2329b81d771e8e3cae51433be873e0ce5d21/script.js#L363

It is looking for the first <input type="text"> it finds on the HTML page (which is always the one on the list of available commands), rather than the input the user clicked on.