clearAnnotationEditing method

void clearAnnotationEditing()

Clear editing state for all annotations.

This exits edit mode for any annotation that is currently being edited. Call this when:

  • User clicks on the canvas background
  • User presses Escape (as a global handler)
  • Switching selection to a different element type

Implementation

void clearAnnotationEditing() {
  runInAction(() {
    for (final annotation in _annotations.values) {
      if (annotation.isEditing) {
        annotation.isEditing = false;
      }
    }
  });
}