TextEditingApp icon indicating copy to clipboard operation
TextEditingApp copied to clipboard

Feature Request : Add Rotation Handle for Text Items

Open may-tas opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe.

  • Currently, text items on the canvas can only be moved and resized by changing font size. Users cannot rotate text items to achieve different orientations, which is a standard feature in modern text editors like Google Docs, Microsoft Word, and Canva. This limitation restricts creative freedom and makes it difficult to create visually appealing designs that require angled text.

Describe the solution you'd like Add a rotation handle to text items that allows users to:

  • Rotate text items by dragging a circular handle
  • Display the current rotation angle while rotating
  • Snap to common angles (0°, 45°, 90°, 135°, 180°, etc.) when close to them
  • Store rotation state persistently when saving pages
  • Support rotation in both drawing and text editing modes

Approach to be followed (optional)

  1. Update TextItemModel lib/models/text_item_model.dart:
  • Add rotation property (in radians or degrees)
  • Update toJson() and fromJson() methods
  1. Update CanvasState lib/cubit/canvas_state.dart:
  • Ensure rotation is preserved in state
  1. Update CanvasCubit lib/cubit/canvas_cubit.dart:
  • Add rotateText(int index, double angle) method
  • Ensure rotation is saved/loaded with pages
  1. Update _DraggableText Widget lib/ui/screens/canvas_screen.dart:
  • Wrap text with Transform.rotate()
  • Add rotation handle widget (small circle icon at corner)
  • Implement gesture detection for rotation handle
  • Calculate rotation angle based on drag vector from center
  • Add visual feedback during rotation (show angle overlay)
  1. UI Considerations:
  • Position rotation handle at top-right corner of text bounding box
  • Use a circular icon (🔄) or custom painter for the handle
  • Show rotation angle tooltip during rotation
  • Implement snap-to-angle feature (±5° tolerance)

Additional context Reference implementations:

  • Canva's rotation handle system
  • Google Docs rotation for images/text boxes
  • Figma's rotation handle

may-tas avatar Oct 09 '25 10:10 may-tas

Thank you for opening this issue! 🚀 Our team will review it soon. Please make sure you've included all relevant details and followed our Contributing Guidelines. For questions about our project, check out our README and Code of Conduct.

github-actions[bot] avatar Oct 09 '25 10:10 github-actions[bot]

Please assign me this issue.

ayn-aval avatar Oct 09 '25 10:10 ayn-aval

@ayn-aval assigned.

may-tas avatar Oct 09 '25 10:10 may-tas

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the main branch has fixed it and report again or close the issue.

github-actions[bot] avatar Oct 17 '25 01:10 github-actions[bot]