Skip to content

ImageEditor throws JavaScript error on reselecting Original Ratio for portrait images #6453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aleksandarevangelatov opened this issue Jun 15, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@aleksandarevangelatov
Copy link
Contributor

aleksandarevangelatov commented Jun 15, 2021

Bug report

The ImageEditor throws a JavaScript error on reselecting Original Ratio for portrait images

Reproduction of the problem

Open the ImageEditor Demo

  1. Load a Portrait image (Width < Height) (sample image: Portrait format image)
  2. Select the Crop tool
  3. Click on Landscape
  4. Select any aspect ratio, for example 16:9
  5. Select "Original ratio" back again

Current behavior

JavaScript error is thrown

Expected/desired behavior

JavaScript error should not be thrown

Environment

  • Kendo UI version: 2021.2.511
  • Browser: [all]
@kendo-bot kendo-bot added FP: Planned Sync status with associated Feedback Item and removed FP: Planned Sync status with associated Feedback Item labels Jun 15, 2021
@Iankodj Iankodj self-assigned this Jun 17, 2021
@kendo-bot kendo-bot added the FP: In Development Sync status with associated Feedback Item label Jun 17, 2021
@Dimitar-Goshev
Copy link
Contributor

The fix resolves the issue. Upon testing I found another scenario, which may be improved.

  1. Load a Portrait image (Width < Height) (sample image: Portrait format image)
  2. Select the Crop tool - Aspect ratio is "Original ratio", Orientation is Portrait and the resize frame covers the whole image
  3. Click on Landscape - Resize frame becomes landscape
  4. Select any aspect ratio, for example 16:9 - Resize frame remains landscape
  5. Select "Original ratio" back again - the resize frame covers the whole image as on step 2, but the Orientation button incorrectly shows Landscape selected, instead of Portrait.

@Dimitar-Goshev Dimitar-Goshev added this to the 2021.R2.SP.next milestone Jun 21, 2021
@kendo-bot kendo-bot added FP: Completed Sync status with associated Feedback Item and removed FP: In Development Sync status with associated Feedback Item labels Jun 21, 2021
@MilenaCh MilenaCh modified the milestones: 2021.R2.SP.next, 2021.R3 Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants