labelAt method

ResolvedConnectorLabel? labelAt(
  1. DiagramPoint worldPoint
)

Most recently authored overlapping attachment owns the hit.

Implementation

ResolvedConnectorLabel? labelAt(DiagramPoint worldPoint) {
  for (final label in labels.reversed) {
    if (label.source.story.plainText.isNotEmpty &&
        label.visualBounds.contains(worldPoint)) {
      return label;
    }
  }
  return null;
}