|
@@ -67,9 +67,11 @@
|
|
|
var height = $image.height();
|
|
|
|
|
|
{% if crop %}
|
|
|
- selection_len = {{ crop.selection_len }};
|
|
|
- start_x = {{ crop.start_x }};
|
|
|
- start_y = {{ crop.start_y }};
|
|
|
+ original_width = {{ crop.image_width }};
|
|
|
+ change_ratio = width / original_width;
|
|
|
+ selection_len = change_ratio * {{ crop.selection_len }};
|
|
|
+ start_x = change_ratio * {{ crop.start_x }};
|
|
|
+ start_y = change_ratio * {{ crop.start_y }};
|
|
|
{% else %}
|
|
|
if (width < height) {
|
|
|
selection_len = width;
|