Skip to content

Commit

Permalink
7.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Danial Farid authored and Danial Farid committed Sep 20, 2015
1 parent a9b5de6 commit 31f0878
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion FileAPI.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions ng-file-upload-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* progress, resize, thumbnail, preview, validation and CORS
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <[email protected]>
* @version 7.3.5
* @version 7.3.6
*/

(function () {
Expand Down Expand Up @@ -424,7 +424,7 @@ if (!window.FileReader) {
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
* progress, resize, thumbnail, preview, validation and CORS
* @author Danial <[email protected]>
* @version 7.3.5
* @version 7.3.6
*/

if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
Expand All @@ -445,7 +445,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {

var ngFileUpload = angular.module('ngFileUpload', []);

ngFileUpload.version = '7.3.5';
ngFileUpload.version = '7.3.6';

ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
var upload = this;
Expand Down Expand Up @@ -1193,13 +1193,15 @@ ngFileUpload.directive('ngfSelect', ['$parse', '$timeout', '$compile', 'Upload',
$timeout(function () {
var unwatch = scope.$watch(attr[directiveName], function (file) {
var size = resizeParams;
if (directiveName === 'ngfThumbnail' && !size) {
size = {width: elem[0].clientWidth, height: elem[0].clientHeight};
}
if (size.width === 0 && window.getComputedStyle) {
var style = getComputedStyle(elem[0]);
size = {width: parseInt(style.width.slice(0, -2)),
height: parseInt(style.height.slice(0, -2))};
if (directiveName === 'ngfThumbnail') {
if (!size) {
size = {width: elem[0].clientWidth, height: elem[0].clientHeight};
}
if (size.width === 0 && window.getComputedStyle) {
var style = getComputedStyle(elem[0]);
size = {width: parseInt(style.width.slice(0, -2)),
height: parseInt(style.height.slice(0, -2))};
}
}

if (angular.isString(file)) {
Expand Down
4 changes: 2 additions & 2 deletions ng-file-upload-all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ng-file-upload-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* progress, resize, thumbnail, preview, validation and CORS
* FileAPI Flash shim for old browsers not supporting FormData
* @author Danial <[email protected]>
* @version 7.3.5
* @version 7.3.6
*/

(function () {
Expand Down
2 changes: 1 addition & 1 deletion ng-file-upload-shim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions ng-file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS file upload directives and services. Supoorts: file upload/drop/paste, resume, cancel/abort,
* progress, resize, thumbnail, preview, validation and CORS
* @author Danial <[email protected]>
* @version 7.3.5
* @version 7.3.6
*/

if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {
Expand All @@ -23,7 +23,7 @@ if (window.XMLHttpRequest && !(window.FileAPI && FileAPI.shouldLoad)) {

var ngFileUpload = angular.module('ngFileUpload', []);

ngFileUpload.version = '7.3.5';
ngFileUpload.version = '7.3.6';

ngFileUpload.service('UploadBase', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
var upload = this;
Expand Down Expand Up @@ -771,13 +771,15 @@ ngFileUpload.directive('ngfSelect', ['$parse', '$timeout', '$compile', 'Upload',
$timeout(function () {
var unwatch = scope.$watch(attr[directiveName], function (file) {
var size = resizeParams;
if (directiveName === 'ngfThumbnail' && !size) {
size = {width: elem[0].clientWidth, height: elem[0].clientHeight};
}
if (size.width === 0 && window.getComputedStyle) {
var style = getComputedStyle(elem[0]);
size = {width: parseInt(style.width.slice(0, -2)),
height: parseInt(style.height.slice(0, -2))};
if (directiveName === 'ngfThumbnail') {
if (!size) {
size = {width: elem[0].clientWidth, height: elem[0].clientHeight};
}
if (size.width === 0 && window.getComputedStyle) {
var style = getComputedStyle(elem[0]);
size = {width: parseInt(style.width.slice(0, -2)),
height: parseInt(style.height.slice(0, -2))};
}
}

if (angular.isString(file)) {
Expand Down
4 changes: 2 additions & 2 deletions ng-file-upload.min.js

Large diffs are not rendered by default.

0 comments on commit 31f0878

Please sign in to comment.