Skip to content

Prevent moving a polygon out of bounds

Erwan Rouchet requested to merge polygon-element-bounds into master

Closes #672 (closed)

The only way I found to move a polygon outside of the image or of the parent element is by dragging an existing polygon (not just one of its points, the whole polygon). I added a check there that causes the polygon to stay stuck to the border, and a lower level check that ensures any polygon the InteractiveImage sends will never have negative coordinates.

Edited by Erwan Rouchet

Merge request reports

Loading