@behance/beff
Advanced tools
Comparing version 9.3.7 to 9.3.8
@@ -333,2 +333,11 @@ define([ | ||
/** | ||
* Checks if the file should not be orientation corrected | ||
* @param {Object} file | ||
* @return {Boolean} | ||
*/ | ||
_shouldNotRotate: function(file) { | ||
return file.type.indexOf('image') === -1 || file.type.indexOf('gif') !== -1; | ||
}, | ||
/** | ||
* Returns correctly scaled, orientation fixed image | ||
@@ -342,3 +351,3 @@ * @param {Number} id | ||
if (file.type.indexOf('image') === -1) { | ||
if (this._shouldNotRotate(file)) { | ||
return Promise.resolve(file); | ||
@@ -345,0 +354,0 @@ } |
{ | ||
"name": "@behance/beff", | ||
"version": "9.3.7", | ||
"version": "9.3.8", | ||
"description": "Behance Frontend Framework", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -27,2 +27,3 @@ define([ | ||
this._audio = { name: image.name, type: 'audio/mp3', data: image.result }; | ||
this._gif = { name: image.name, type: 'image/gif', data: image.result }; | ||
@@ -44,11 +45,12 @@ this.scaled = [ | ||
getFile: function(id) { | ||
if (id === 'video') { | ||
return this._video; | ||
switch (id) { | ||
case 'video': | ||
return this._video; | ||
case 'audio': | ||
return this._audio; | ||
case 'gif': | ||
return this._gif; | ||
default: | ||
return this._blob; | ||
} | ||
if (id === 'audio') { | ||
return this._audio; | ||
} | ||
return this._blob; | ||
}, | ||
@@ -55,0 +57,0 @@ |
@@ -220,2 +220,18 @@ define([ | ||
it('does not fire the processing event on a submit with a gif type file', function(done) { | ||
spyOn(this.uploader, 'trigger').and.callThrough(); | ||
this.uploader.on('submit', function() { | ||
var allArgs = this.uploader.trigger.calls.allArgs(); | ||
allArgs.forEach(function(arg) { | ||
expect(arg[0]).not.toEqual('processing'); | ||
}); | ||
done(); | ||
}.bind(this)); | ||
fineuploaderMock.fakeSubmit('gif'); | ||
}); | ||
it('fires the error event with a suitable message on an upload error', function(done) { | ||
@@ -222,0 +238,0 @@ var filename = fineuploaderMock.getFakeImageName(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1572192
14269