Skip to content

Commit

Permalink
Update js.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayarjo committed Aug 5, 2015
1 parent 5c8b71a commit d91c637
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 24 deletions.
4 changes: 2 additions & 2 deletions bin/js/moxie.dev.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
;var MXI_DEBUG = true;
/**
* mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill
* v1.4.0
* v1.4.1
*
* Copyright 2013, Moxiecode Systems AB
* Released under GPL License.
*
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*
* Date: 2014-07-10
* Date: 2014-08-05
*/
/**
* Inline development version. Only to be used while developing since it uses document.write to load scripts.
Expand Down
56 changes: 39 additions & 17 deletions bin/js/moxie.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
;var MXI_DEBUG = true;
/**
* mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill
* v1.4.0
* v1.4.1
*
* Copyright 2013, Moxiecode Systems AB
* Released under GPL License.
*
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*
* Date: 2014-07-10
* Date: 2014-08-05
*/
/**
* Compiled inline version. (Library mode)
Expand Down Expand Up @@ -6031,14 +6031,6 @@ define("moxie/image/Image", [
info = this.exec('Image', 'getInfo');
}

// store thumbnail data as blob
if (info.meta && info.meta.thumb && !(info.meta.thumb.data instanceof Blob)) {
info.meta.thumb.data = new Blob(this.ruid, {
type: 'image/jpeg',
data: info.meta.thumb.data
});
}

this.size = info.size;
this.width = info.width;
this.height = info.height;
Expand Down Expand Up @@ -6077,7 +6069,7 @@ define("moxie/image/Image", [
// if String
else if (srcType === 'string') {
// if dataUrl String
if (/^data:[^;]*;base64,/.test(src)) {
if (src.substr(0, 5) === 'data:') {
_load.call(this, new Blob(null, { data: src }), arguments[1]);
}
// else assume Url, either relative or absolute
Expand Down Expand Up @@ -6229,9 +6221,12 @@ define("moxie/runtime/html5/Runtime", [
(Env.browser !== 'IE' || Env.verComp(Env.version, 9, '>'));
}()),
filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest
return (Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '>=')) ||
(Env.browser === 'IE' && Env.verComp(Env.version, 10, '>=')) ||
(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '>='));
return !(
(Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '<')) ||
(Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) ||
(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '<')) ||
(Env.browser === 'Firefox' && Env.verComp(Env.version, 37, '<'))
);
}()),
return_response_headers: True,
return_response_type: function(responseType) {
Expand Down Expand Up @@ -8843,6 +8838,14 @@ define("moxie/runtime/html5/image/Image", [
meta: _imgInfo && _imgInfo.meta || this.meta || {}
};

// store thumbnail data as blob
if (info.meta && info.meta.thumb && !(info.meta.thumb.data instanceof Blob)) {
info.meta.thumb.data = new Blob(null, {
type: 'image/jpeg',
data: info.meta.thumb.data
});
}

return info;
},

Expand Down Expand Up @@ -9906,6 +9909,17 @@ define("moxie/runtime/flash/image/Image", [
return self.shimExec.call(this, 'Image', 'loadFromImage', img.uid);
},

getInfo: function() {
var self = this.getRuntime()
, info = self.shimExec.call(this, 'Image', 'getInfo')
;

if (info.meta && info.meta.thumb && !(info.meta.thumb.data instanceof Blob)) {
info.meta.thumb.data = new Blob(self.uid, info.meta.thumb.data);
}
return info;
},

getAsBlob: function(type, quality) {
var self = this.getRuntime()
, blob = self.shimExec.call(this, 'Image', 'getAsBlob', type, quality)
Expand Down Expand Up @@ -10435,6 +10449,11 @@ define("moxie/runtime/silverlight/image/Image", [
}
}
});

// save thumb data as blob
if (info.meta && info.meta.thumb && !(info.meta.thumb.data instanceof Blob)) {
info.meta.thumb.data = new Blob(self.uid, info.meta.thumb.data);
}
}

info.width = parseInt(rawInfo.width, 10);
Expand Down Expand Up @@ -10490,9 +10509,12 @@ define("moxie/runtime/html4/Runtime", [
do_cors: false,
drag_and_drop: false,
filter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest
return (Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '>=')) ||
(Env.browser === 'IE' && Env.verComp(Env.version, 10, '>=')) ||
(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '>='));
return !(
(Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '<')) ||
(Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) ||
(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '<')) ||
(Env.browser === 'Firefox' && Env.verComp(Env.version, 37, '<'))
);
}()),
resize_image: function() {
return extensions.Image && I.can('access_binary') && Env.can('create_canvas');
Expand Down
Loading

0 comments on commit d91c637

Please sign in to comment.