Skip to content

Commit

Permalink
Merge pull request #7 from mebibou/bugfix/minification
Browse files Browse the repository at this point in the history
fix minification issues
  • Loading branch information
fabre-thibaud authored Sep 7, 2018
2 parents 68514d3 + 79ebb2f commit 9862464
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions dist/angular-thumbnails.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
};
return this;
}
angular.module("angular-thumbnails", []).directive("thumbnail", function($window) {
angular.module("angular-thumbnails", []).directive("thumbnail", [ function() {
return {
restrict: "E",
scope: {
Expand All @@ -113,7 +113,7 @@
maxWidth: "@",
imgUrl: "="
},
link: function(scope, element, attrs) {
link: function(scope, element) {
var canvas = document.createElement("canvas"), renderer = null, renderFunc = function() {
if (renderer) {
renderer.render();
Expand All @@ -130,5 +130,5 @@
scope.$watch("source + fileType + scale + maxHeight + maxWidth", renderFunc);
}
};
});
} ]);
})();
2 changes: 1 addition & 1 deletion dist/angular-thumbnails.min.js

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

12 changes: 6 additions & 6 deletions src/angular-thumbnails.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
});

container.append(video);

video.src = scope.source;
}

Expand Down Expand Up @@ -165,7 +165,7 @@
return this;
}

angular.module('angular-thumbnails', []).directive('thumbnail', function ($window) {
angular.module('angular-thumbnails', []).directive('thumbnail', [function () {
return {
restrict: 'E',
scope: {
Expand All @@ -176,7 +176,7 @@
'maxWidth': '@',
'imgUrl': "="
},
link: function (scope, element, attrs) {
link: function (scope, element) {
var canvas = document.createElement('canvas'),
renderer = null,
renderFunc = function () {
Expand All @@ -192,12 +192,12 @@
} else if (scope.fileType === 'image') {
renderer = new ImgRenderer(scope, canvas);
} else if (scope.fileType === 'video') {
renderer = new VideoRenderer(scope, element, canvas);
renderer = new VideoRenderer(scope, element, canvas);
}

scope.$watch('source + fileType + scale + maxHeight + maxWidth', renderFunc);
}
};
});
}]);

}());
}());

0 comments on commit 9862464

Please sign in to comment.