modify style

This commit is contained in:
MaysWind 2016-06-23 22:48:35 +08:00
parent c0946491b9
commit a8a5461d38

View file

@ -15,7 +15,9 @@
var pieces = aria2TaskService.getPieceStatus(scope.bitField, scope.pieceCount);
element.empty();
for (var i = 0; i < pieces.length; i++) {
var pieceCount = Math.max(1, pieces.length);
for (var i = 0; i < pieceCount; i++) {
element.append('<div class="piece' + (pieces[i] ? ' piece-completed' : '') + '"></div>');
}
};