[V2] What is the best way possible to fit <cropper-selection> to take image height and image width? #968
Unanswered
ramicbenjamin
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Do you see the
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Do you see the
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
thank you for maintaining this great library.
I have a question regarding setting
<cropper-selection>
to take image height and width.I tried doing it by using
$change
method and setting it like$change(0, 0, cropperImage.$image.clientWidth, cropperImage.$image.clientHeight)
and then calling$center
method but for some reasonclientWidth
andclientHeight
, as well asheight
andwidth
andoffsetHeight
andoffsetWidth
are always returning actual image size, and not the size of the displayed image.See the image below:
I would expect that one of these return
1074
and716
, so I can center it that way.Am I doing this right, and is there a better way of doing this?
This is what I would expect to happen:
Beta Was this translation helpful? Give feedback.
All reactions