vendor/assets/javascripts/webshims/shims/combos/27.js in webshims-rails-1.15.3 vs vendor/assets/javascripts/webshims/shims/combos/27.js in webshims-rails-1.15.4
- old
+ new
@@ -1630,25 +1630,22 @@
}
if(type == 'image/jpeg' && !qualitiy){
qualitiy = 0.8;
}
loadMoxie();
- setTimeout(function(){
+ webshim.ready('moxie', function(){
+ var img = new mOxie.Image();
dataURL = $canvas.callProp('getAsDataURL', [type, qualitiy]);
- webshim.ready('moxie', function(){
- var img = new mOxie.Image();
-
- img.onload = function() {
- var blob = img.getAsBlob();
- webshim.defineProperty(blob, '_wsDataURL', {
- value: dataURL,
- enumerable: false
- });
- cb(blob);
- };
- img.load(dataURL);
- });
- }, 9);
+ img.onload = function() {
+ var blob = img.getAsBlob();
+ webshim.defineProperty(blob, '_wsDataURL', {
+ value: dataURL,
+ enumerable: false
+ });
+ cb(blob);
+ };
+ img.load(dataURL);
+ });
}
}
});
webshim.ready('url', function(){