Skip to content

Commit 9862464

Browse files
Merge pull request #7 from mebibou/bugfix/minification
fix minification issues
2 parents 68514d3 + 79ebb2f commit 9862464

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

dist/angular-thumbnails.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
};
103103
return this;
104104
}
105-
angular.module("angular-thumbnails", []).directive("thumbnail", function($window) {
105+
angular.module("angular-thumbnails", []).directive("thumbnail", [ function() {
106106
return {
107107
restrict: "E",
108108
scope: {
@@ -113,7 +113,7 @@
113113
maxWidth: "@",
114114
imgUrl: "="
115115
},
116-
link: function(scope, element, attrs) {
116+
link: function(scope, element) {
117117
var canvas = document.createElement("canvas"), renderer = null, renderFunc = function() {
118118
if (renderer) {
119119
renderer.render();
@@ -130,5 +130,5 @@
130130
scope.$watch("source + fileType + scale + maxHeight + maxWidth", renderFunc);
131131
}
132132
};
133-
});
133+
} ]);
134134
})();

dist/angular-thumbnails.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/angular-thumbnails.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
});
134134

135135
container.append(video);
136-
136+
137137
video.src = scope.source;
138138
}
139139

@@ -165,7 +165,7 @@
165165
return this;
166166
}
167167

168-
angular.module('angular-thumbnails', []).directive('thumbnail', function ($window) {
168+
angular.module('angular-thumbnails', []).directive('thumbnail', [function () {
169169
return {
170170
restrict: 'E',
171171
scope: {
@@ -176,7 +176,7 @@
176176
'maxWidth': '@',
177177
'imgUrl': "="
178178
},
179-
link: function (scope, element, attrs) {
179+
link: function (scope, element) {
180180
var canvas = document.createElement('canvas'),
181181
renderer = null,
182182
renderFunc = function () {
@@ -192,12 +192,12 @@
192192
} else if (scope.fileType === 'image') {
193193
renderer = new ImgRenderer(scope, canvas);
194194
} else if (scope.fileType === 'video') {
195-
renderer = new VideoRenderer(scope, element, canvas);
195+
renderer = new VideoRenderer(scope, element, canvas);
196196
}
197197

198198
scope.$watch('source + fileType + scale + maxHeight + maxWidth', renderFunc);
199199
}
200200
};
201-
});
201+
}]);
202202

203-
}());
203+
}());

0 commit comments

Comments
 (0)