Skip to content
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

Image doesn't scale upon setSize(string,string) #7

Closed
GoogleCodeExporter opened this issue Mar 14, 2015 · 8 comments
Closed

Image doesn't scale upon setSize(string,string) #7

GoogleCodeExporter opened this issue Mar 14, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

GWTCropper crop = new GWTCropper(tempUrl);
crop.setAspectRatio((float) 7.8); // banner dimensions
crop.setSize("468px", "60px");

Where tempUrl is an arbitrary url that points to an image of size  greater than 
size dimensions.

What is the expected output? What do you see instead?

I expect the image panel inside the GWT-cropper element to be adjusted so the 
image scales rather than overflows.

What version of the product are you using? On what operating system?

Using Chrome:

<dependency>
    <groupId>com.googlecode.gwt-cropper</groupId>
    <artifactId>gwt-crop</artifactId>
    <version>0.4.0</version>
</dependency>

Please provide any additional information below.
http://imgur.com/jjvyEKE

Here is a screenshot that shows the issue generated from the code above.

http://imgur.com/K98XlNP

Another screenshot of what i expect the output to be.

Also note that the selection box is not within viewable range when the image 
does not fit.


Original issue reported on code.google.com by connor.w...@gmail.com on 21 May 2013 at 2:13

@GoogleCodeExporter
Copy link
Author

Original comment by ilja.hamalainen on 21 May 2013 at 5:19

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Thank you for all your help, I now have all the functionality I need.

Original comment by connor.w...@gmail.com on 13 Jun 2013 at 10:27

@GoogleCodeExporter
Copy link
Author

I hope I helped you. Have a nice summer! ;)

Original comment by ilja.hamalainen on 18 Jun 2013 at 9:46

@GoogleCodeExporter
Copy link
Author

Would you mind sharing the solution?  I've tried with v0.4.3 and see the same 
issue.

Original comment by kushal.k...@gmail.com on 22 Jun 2013 at 5:43

@GoogleCodeExporter
Copy link
Author

Original comment by ilja.hamalainen on 23 Jun 2013 at 4:33

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Screenshot of my preliminary result.

Original comment by ilja.hamalainen on 23 Jun 2013 at 5:09

Attachments:

@GoogleCodeExporter
Copy link
Author

Released version 0.4.4, that supports widget scaling. It is already available 
in the Maven repository. If you will find some issues, please notify me about 
that. Thank you!

*Note*.
Do not use method _setSize(String w, String h)_. I marked it as "deprecated". 
Use method _setSize(int width, int height)_ instead!

Original comment by ilja.hamalainen on 24 Jun 2013 at 12:47

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Thanks, it works great!

Original comment by kushal.k...@gmail.com on 27 Jun 2013 at 1:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant