Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Fixed an image.js issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Sinchok committed Jun 12, 2014
1 parent 5d117cd commit d209fbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion betty/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from .celery import app as celery_app # noqa

__version__ = "0.2.2"
__version__ = "0.2.3"
11 changes: 6 additions & 5 deletions betty/cropper/templates/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
crop = computeAspectRatio(_w, _h);
}
// Scale up to the pixel ratio
if (w.devicePixelRatio) {
_w = Math.round(w.devicePixelRatio * _w);
_h = Math.round(w.devicePixelRatio * _h);
}
var width = null;
for (var j = 0; j < breakpoints.length; j++) {
if (_w <= breakpoints[j]) {
Expand All @@ -81,11 +87,6 @@
width = _w;
}
// Scale the image up to the pixel ratio
if (w.devicePixelRatio) {
width = Math.round(w.devicePixelRatio * width);
}
// if the existing image is larger (or the same) than the one we're about to load, do not update.
//however if the crop changes, we need to reload.
if (width > 0) {
Expand Down

0 comments on commit d209fbb

Please sign in to comment.