Skip to content

Resolve EMC-83 "Undeletable bboxes"

Jonathan Cooper requested to merge EMC-83-undeletable-bboxes into develop

This fixes the bug that prevented users from saving their deletion of bounding boxes in the editor.

Fundamentally, a trim() method in leaflet-src.js is unsafe to use when passed an undefined variable. The easiest way to get around it was to override the remove() method of BoundingBoxView, so it didn't then trigger this trim() method.

An attempt was made to write a test that would test the correct removal of the bounding box from the Backbone model collection, but this proved too complex for the small benefit it would bring (I got quite a long way!). However, an existing bounding box test was improved as it was shown that it would pass even when it shouldn't.

Closes EMC-83

Merge request reports

Loading