moveSelectedAnnotations method

void moveSelectedAnnotations(
  1. Offset delta
)

Implementation

void moveSelectedAnnotations(Offset delta) {
  runInAction(() {
    for (final annotationId in _selectedAnnotationIds) {
      final annotation = _annotations[annotationId];
      if (annotation?.isInteractive == true) {
        final newPosition = annotation!.currentPosition + delta;
        annotation.setPosition(newPosition);
        // Update visual position with snapping (identical to node behavior)
        annotation.setVisualPosition(
          _parentController.config.snapAnnotationsToGridIfEnabled(
            newPosition,
          ),
        );
      }
    }
  });
}