polysize-rails 0.0.6 → 0.0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0dcfad9ec706c683407c395dc7403cad4b33e78
4
- data.tar.gz: 1fe3618fa27e8041865fd29467324d0a38bb9f12
3
+ metadata.gz: e25815f55ee6d8d64486a5cb811356fcfd5eba85
4
+ data.tar.gz: c53a58bf5a7f0c4732eb27b907b36d8dd5c5ddae
5
5
  SHA512:
6
- metadata.gz: 638d6691a1ff698492a2469a36e39a5886f3c622891c5383fccbe50f6b2957dade80b74640fa2d8e0910d876e447ebffbdf0ee8e9c4e2bf9d5336d7e16092f09
7
- data.tar.gz: a20bdf7e0c727ed9c33d5e1b018d0b178981efe0791e83543616cc8b6095deaf0e3a269d1443c47be7c2daa601cd0f5fb088f62ba96cdbbf2898caf64d3d257e
6
+ metadata.gz: 9a153f4558cba0b03732e887ce3f02f4c8b5137a189c1792916797404d54e9d1493020881b5b002f65158700e53c470ee5080da846e5c478c362fcb108a0d8fe
7
+ data.tar.gz: 6f4ebc239b7dac63014bf6dc5dfe7f7fe0211c3d4761129934aa8b6d3f27866ee49061aab8a64425f67194c5d0bda5c9096062c1fb618f385a368a154252e16f
@@ -1,3 +1,3 @@
1
1
  module PolysizeRails
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.6.1"
3
3
  end
@@ -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
- img.onload = function (e) {
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);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polysize-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Waltman II