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

Viewport / draggable distort the image #7

Open
Martenvanurk opened this issue Dec 21, 2011 · 2 comments
Open

Viewport / draggable distort the image #7

Martenvanurk opened this issue Dec 21, 2011 · 2 comments

Comments

@Martenvanurk
Copy link

Dear,

I loaded an image with the dimensions 4000 x 2666 ( or bigger ) in the viewport. My viewport is 965px x 460px. The draggable square is positioned at the right.

When I drag the square a little bit too the left, the image is distort ( width and height are messy, the image will be stretched. ) When I use for example an image with the dimensions 1024px x 768px ( the draggable sqaure positioned in the middle ) the image will be nice transformed.

I think the range of the draggable square isn't enough for big sized images. Maybe you can fix this? I solved my problem with resize the image when it's uploaded.

Your sincerely,
Marten

@trepmag
Copy link
Owner

trepmag commented Feb 25, 2012

Hello,

I've tried with the same settings as you described but couldn't reproduce the issue. I did try with opera 11, firefox 10 and iexplorer 9. Perhaps let me know on which browser, version or any other informations did this happen.

Also, you can change the range for the zoom widget, eg: $(img).jrac({'zoom_min':100,'zoom_max': 5000});.

Thanks for your report and sorry for delay.

@EduardoOliveira
Copy link

I was experiencing the same problem on Chrome Version 30.0.1599.66

Changed some code arround, came up with this:
slide: function(event, ui) {
var height = Math.round($image.originalHeight * ui.value /100);
var width = Math.round($image.originalWidth * ui.value /100);
$image.height(height);
$image.width(width);
$viewport.observator.notify('jrac_image_height', height);
$viewport.observator.notify('jrac_image_width', width);
}
Now the zoom it's working for me at least

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

No branches or pull requests

3 participants