Chaseis4344 / USV-Project-Code

0 stars 0 forks source link

Issue with Deleting First Line on Polygon Update #5

Closed Jiffy953 closed 8 months ago

Jiffy953 commented 8 months ago

Description

Not all lines are being deleted upon updating a polygon shape on the map. Specifically, the first line often remains after the update, despite logs indicating that deletion methods are being called correctly. We've confirmed through logs that the IDs for old lines are being passed to the draw.delete method, and the method is executed without any logged errors.

Steps to Reproduce

  1. Draw a polygon on the map.
  2. Use the provided method to create lines within the polygon.
  3. Move the polygon to trigger an update.
  4. Observe that the first line is not deleted visually, although the logs suggest it should be.

Expected Behavior

All lines associated with the old polygon shape should be deleted before new lines are drawn based on the updated polygon shape.

Actual Behavior

All lines except for the first are deleted. The first line remains on the map, leading to duplication and overlap when the polygon is moved. image image

Possible Solution