| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // TODO: | 5 // TODO: |
| 6 // 1. Visibility functions: base on boxPadding.t, not 15 | 6 // 1. Visibility functions: base on boxPadding.t, not 15 |
| 7 // 2. Track a maxDisplayDepth that is user-settable: | 7 // 2. Track a maxDisplayDepth that is user-settable: |
| 8 // maxDepth == currentRoot.depth + maxDisplayDepth | 8 // maxDepth == currentRoot.depth + maxDisplayDepth |
| 9 function D3SymbolTreeMap(mapWidth, mapHeight, levelsToShow) { | 9 function D3SymbolTreeMap(mapWidth, mapHeight, levelsToShow) { |
| 10 this._mapContainer = undefined; | 10 this._mapContainer = undefined; |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 if (datum.value > smallest) { // array is already full | 902 if (datum.value > smallest) { // array is already full |
| 903 result.push(datum); | 903 result.push(datum); |
| 904 result.sort(sortFunction); | 904 result.sort(sortFunction); |
| 905 result.pop(); // get rid of smallest element | 905 result.pop(); // get rid of smallest element |
| 906 smallest = result[maxRecords - 1].value; // new threshold for entry | 906 smallest = result[maxRecords - 1].value; // new threshold for entry |
| 907 } | 907 } |
| 908 }); | 908 }); |
| 909 result.sort(sortFunction); | 909 result.sort(sortFunction); |
| 910 return result; | 910 return result; |
| 911 } | 911 } |
| OLD | NEW |