Skip to content

rotateCropBoxFor90DegreeRotation = false causes abnormal crop box resizing after rotation #486

@limingming-netizen

Description

@limingming-netizen

When rotateCropBoxFor90DegreeRotation is set to false, the crop box interaction becomes unstable after a 90-degree rotation.
Specifically, dragging the bottom-left or bottom-right corner of the crop box may cause it to suddenly shrink.

This behavior appears to be unintended and breaks the expected cropping interaction.

  1. In the Example project, locate the following method in ViewController.swift:
@IBAction func normalPresent(_ sender: Any) {}
  1. Inside this method, find the code block:
if let transformation = transformation {
  1. Add the following line above that block:
config.cropViewConfig.rotateCropBoxFor90DegreeRotation = false
  1. Run the demo.

  2. Tap the "Normal" button.

  3. Tap the Rotate button to rotate the image.

  4. Drag the bottom-left or bottom-right corner of the crop box.

Actual Result

The crop box may suddenly shrink while dragging, resulting in an abnormal and jumpy interaction.

Expected Result

After rotation, dragging any corner of the crop box should resize it smoothly and consistently, regardless of the value of rotateCropBoxFor90DegreeRotation.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions