polysize-rails 0.0.6 → 0.0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polysize-rails/version.rb +1 -1
- data/vendor/assets/javascripts/polysize.js +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e25815f55ee6d8d64486a5cb811356fcfd5eba85
|
4
|
+
data.tar.gz: c53a58bf5a7f0c4732eb27b907b36d8dd5c5ddae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a153f4558cba0b03732e887ce3f02f4c8b5137a189c1792916797404d54e9d1493020881b5b002f65158700e53c470ee5080da846e5c478c362fcb108a0d8fe
|
7
|
+
data.tar.gz: 6f4ebc239b7dac63014bf6dc5dfe7f7fe0211c3d4761129934aa8b6d3f27866ee49061aab8a64425f67194c5d0bda5c9096062c1fb618f385a368a154252e16f
|
@@ -20,9 +20,10 @@ window.Polysize = (function() {
|
|
20
20
|
if (typeof(bounds) === 'number') bounds = [bounds, bounds];
|
21
21
|
|
22
22
|
reader.onload = (function (f) { return function (e) {
|
23
|
-
var img = new Image()
|
23
|
+
var img = new Image(),
|
24
|
+
handleImageLoad;
|
24
25
|
|
25
|
-
|
26
|
+
handleImageLoad = function (e) {
|
26
27
|
var canvas, ctx, data, w, h, x, y,
|
27
28
|
imgRatio = img.width / img.height,
|
28
29
|
newRatio = bounds[0] / bounds[1];
|
@@ -44,6 +45,7 @@ window.Polysize = (function() {
|
|
44
45
|
ctx.mozImageSmoothingEnabled = true;
|
45
46
|
ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0,
|
46
47
|
options.sizing[0], options.sizing[1]);
|
48
|
+
img.onload = handleImageLoad;
|
47
49
|
img.src = canvas.toDataURL();
|
48
50
|
delete options.sizing;
|
49
51
|
return;
|
@@ -145,6 +147,7 @@ window.Polysize = (function() {
|
|
145
147
|
|
146
148
|
if (typeof(callback) === 'function') callback(img);
|
147
149
|
};
|
150
|
+
img.onload = handleImageLoad;
|
148
151
|
img.src = e.target.result;
|
149
152
|
|
150
153
|
}; })(file);
|