This commit is contained in:
MaysWind 2016-07-04 22:59:07 +08:00
parent 701d945371
commit 63c1ed23f4

View file

@ -20,7 +20,7 @@
element.empty();
var pieceCount = Math.max(1, currentPieceStatus.length);
for (var i = 0; i < pieceCount; i++) {
var piece = angular.element('<div class="piece' + (currentPieceStatus[i] ? ' piece-completed' : '') + '"></div>');
pieces.push(piece);
@ -53,7 +53,7 @@
refresh();
});
scope.$watch('pieceNumber', function () {
scope.$watch('pieceCount', function () {
redraw();
});
}