tui.image-editor icon indicating copy to clipboard operation
tui.image-editor copied to clipboard

setCropzoneRect method name is misleading + need a real method to set the cropzone rect

Open Mouradif opened this issue 3 years ago • 7 comments

Version 3.14.3

Development Environment Chrome on Ubuntu 20.04

Current Behavior

setCropzoneRect() doesn't set the crop zone rectangle, instead it sets the ratio (should have been named setCropzoneRatio maybe)

Expected Behavior

since getCropzoneRect returns an object with top, left, width and height, one would expect setCropzoneRect to take as an argument a similar object and would expect that function to programmatically set the cropzone rectangle (which is what I'm trying to do)

Mouradif avatar May 19 '21 02:05 Mouradif

@Mouradif Thank you for your suggestion. I think that is a reasonable suggestion. I'll decide after having a meeting with the team.

lja1018 avatar May 20 '21 02:05 lja1018

I've started working on it while still discovering the code, it may take a little time but I'll send a PR if they are welcome

Mouradif avatar May 25 '21 09:05 Mouradif

@Mouradif Contributing is always welcome. I'll be waiting for your PR.

lja1018 avatar May 26 '21 01:05 lja1018

Any updates?

wenjing-pure avatar Mar 24 '22 03:03 wenjing-pure

My apologies, I got carried away with other stuff... I'll make the PR right away

Mouradif avatar Mar 24 '22 07:03 Mouradif

Here: https://github.com/nhn/tui.image-editor/pull/742

Mouradif avatar Mar 24 '22 08:03 Mouradif

@Mouradif Can these two functions be used now? Why did I use it and it didn't work?

wenjing-pure avatar Mar 24 '22 09:03 wenjing-pure