Skip to content

Conversation

@TrevorBurgoyne
Copy link
Member

Vertex Delete

Description

  • Closes Vertex deletion for polygon/polyline modes #159
  • Add vertex deletion keybind for polygon and polyline annotations
    • New configurable delete_vertex_keybind (default: x)
    • Delete individual vertices by hovering over them and pressing the keybind
    • Automatically deletes entire polyline if only 1 point remains after deletion
    • Automatically removes polygon layer if fewer than 3 points remain after deletion
  • Fixed bug where deleting an annotation mid-edit would cause the ULabel state to be stuck in edit mode.

PR Checklist

  • Merged latest main
  • Version number in package.json has been bumped since last release
  • Version numbers match between package package.json and src/version.js
  • Updated documentation if necessary (currently just in api_spec.md)
  • Added changes to changelog.md

Breaking API Changes

No

@TrevorBurgoyne TrevorBurgoyne added the enhancement New feature or request label Jan 16, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a vertex deletion feature for polygon and polyline annotations, adding a new configurable keybind (default: x) that allows users to delete individual vertices by hovering over them. It also fixes a bug where deleting an annotation mid-edit would leave the ULabel state stuck in edit mode.

Changes:

  • Added delete_vertex_keybind configuration option with default value "x"
  • Implemented vertex deletion logic with automatic cleanup (polylines with ≤1 point and polygon layers with <3 points are removed)
  • Fixed state clearing bug in annotation deletion to prevent edit mode getting stuck
  • Added comprehensive E2E tests for vertex deletion functionality

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/configuration.ts Added new delete_vertex_keybind configuration property
src/toolbox_items/keybinds.ts Registered the delete vertex keybind in the toolbox UI
src/listeners.ts Added keypress handler for delete vertex keybind
src/index.js Implemented delete_vertex, undo/redo methods, and state clearing fixes; added is_vertex flag to edit candidates
src/actions.ts Added action handlers for delete_vertex operations
tests/testing-utils/drawing_utils.js Added helper functions for drawing polygons and polylines in tests
tests/e2e/keybind-functionality.spec.js Added E2E tests for vertex deletion functionality
src/version.js Bumped version to 0.23.0
package.json Updated version to 0.23.0
api_spec.md Documented the new delete_vertex_keybind configuration
CHANGELOG.md Added release notes for version 0.23.0
.github/tasks.md Updated task list with completed implementation items

@TrevorBurgoyne TrevorBurgoyne merged commit 36e5029 into main Jan 20, 2026
3 checks passed
@TrevorBurgoyne TrevorBurgoyne deleted the feature/vertex-delete branch January 20, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vertex deletion for polygon/polyline modes

2 participants