jrac icon indicating copy to clipboard operation
jrac copied to clipboard

resizing large images

Open nkanaev opened this issue 9 years ago • 0 comments

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.

nkanaev avatar Jun 02 '15 11:06 nkanaev