OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 |
| 6 var propertyPainter = (function () { |
| 7 "use strict"; |
| 8 |
| 9 var propPainter = {}; |
| 10 |
| 11 propPainter.paintNew = function (playerInfo, div) { |
| 12 removeChildren(div); |
| 13 var table = makeTable("Key", "Value", "Timestamp"); |
| 14 |
| 15 goog.object.forEach(playerInfo.properties, function (element, index) { |
| 16 var pastValues = playerInfo.pastValues[index]; |
| 17 var lastValue = pastValues[pastValues.length - 1]; |
| 18 var time = goog.time.millisToString(lastValue.time); |
| 19 |
| 20 var row = genRow([index, element, time]); |
| 21 |
| 22 appendRow(table, row); |
| 23 }); |
| 24 div.appendChild(table); |
| 25 }; |
| 26 |
| 27 propPainter.paintExist = propPainter.paintNew; |
| 28 |
| 29 |
| 30 propPainter.invalidate = function () { |
| 31 // Do nothing |
| 32 }; |
| 33 |
| 34 return propPainter; |
| 35 }()); |
OLD | NEW |