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

resizing large images #38

Open
nkanaev opened this issue Jun 2, 2015 · 0 comments
Open

resizing large images #38

nkanaev opened this issue Jun 2, 2015 · 0 comments

Comments

@nkanaev
Copy link

nkanaev commented Jun 2, 2015

When source image has large size, sometimes image is displayed stretched. The issue seems to be caused by the following code:

var $zoom_widget = $('<div class="jrac_zoom_slider"><div class="ui-slider-handle"></div></div>')
      .slider({
        value: $image.width(),
        min: settings.zoom_min,
        max: settings.zoom_max,
        start: function(event, ui) {
          $.extend($zoom_widget,{
            on_start_width_value: ui.value,
            on_start_height_value: $image.height()
          })
        },
...

when image width is larger than zoom_max, corresponding height is calculated incorrectly when slider is toggled. Changing

on_start_width_value: ui.value

to

on_start_width_value: $image.width()

fixed the issue.

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

1 participant