Skip to content

Commit 7123d0a

Browse files
committed
feat(styles): use style.cssText
1 parent 65610da commit 7123d0a

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

dist/angular-carousel.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,9 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
320320
function updateSlidesPosition(offset) {
321321
// manually apply transformation to carousel childrens
322322
// todo : optim : apply only to visible items
323-
var style, x;
324-
x = scope.carouselBufferIndex * 100 + offset;
323+
var x = scope.carouselBufferIndex * 100 + offset;
325324
angular.forEach(getSlidesDOM(), function(child, index) {
326-
style = createStyleString(computeCarouselSlideStyle(index, x, options.transitionType));
327-
if (child.getAttribute('style') !== style) {
328-
child.setAttribute('style', style);
329-
}
330-
325+
child.style.cssText = createStyleString(computeCarouselSlideStyle(index, x, options.transitionType));
331326
});
332327
}
333328

0 commit comments

Comments
 (0)