fix bug
This commit is contained in:
parent
701d945371
commit
63c1ed23f4
|
@ -20,7 +20,7 @@
|
||||||
element.empty();
|
element.empty();
|
||||||
|
|
||||||
var pieceCount = Math.max(1, currentPieceStatus.length);
|
var pieceCount = Math.max(1, currentPieceStatus.length);
|
||||||
|
|
||||||
for (var i = 0; i < pieceCount; i++) {
|
for (var i = 0; i < pieceCount; i++) {
|
||||||
var piece = angular.element('<div class="piece' + (currentPieceStatus[i] ? ' piece-completed' : '') + '"></div>');
|
var piece = angular.element('<div class="piece' + (currentPieceStatus[i] ? ' piece-completed' : '') + '"></div>');
|
||||||
pieces.push(piece);
|
pieces.push(piece);
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
refresh();
|
refresh();
|
||||||
});
|
});
|
||||||
|
|
||||||
scope.$watch('pieceNumber', function () {
|
scope.$watch('pieceCount', function () {
|
||||||
redraw();
|
redraw();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue