Skip to content

Commit

Permalink
added 2 fixed columns example to the json tab
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewirts committed Apr 14, 2015
1 parent e436e28 commit fb9cae6
Show file tree
Hide file tree
Showing 54 changed files with 96 additions and 833 deletions.
29 changes: 29 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,35 @@ <h3>fin-hypergrid-behavior-gol</h3> This element is another custom Polymer web c
//set the actual json row objects
jsonModel.setData(data);



//example of replacing functions to have more fixed columns
//make sure to override the default cell renderer for the top left area or it will be blank
cellProvider.getTopLeftCell = function(config) {
var cell = this.cellCache.simpleCellRenderer;
cell.config = config;
return cell;
};
jsonModel.getFixedColumnCount = function() {
return 2;
};
jsonModel.getFixedColumnValue = function(x,y) {
if (x === 0) {
return y + 1;
} else {
return jsonModel.getRowCount() - y;
}
};
jsonModel.getTopLeftValue = function(x, y) {
if (x === 0) {
return 'n';
} else {
return 'count - n';
}
};



//sort ascending on the first column (first name)
//jsonModel.toggleSort(0);

Expand Down
33 changes: 33 additions & 0 deletions fin-hypergrid.dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -21321,6 +21321,7 @@






</style>
Expand Down Expand Up @@ -22403,6 +22404,7 @@






</style>
Expand Down Expand Up @@ -22631,6 +22633,7 @@






</style>
Expand Down Expand Up @@ -22913,6 +22916,7 @@






</style>
Expand Down Expand Up @@ -23195,6 +23199,7 @@






</style>
Expand Down Expand Up @@ -23517,6 +23522,7 @@




</style>
</template>
<script>'use strict';
Expand Down Expand Up @@ -23611,6 +23617,7 @@






</style>
Expand Down Expand Up @@ -23776,6 +23783,7 @@






</style>
Expand Down Expand Up @@ -24416,6 +24424,7 @@






</style>
Expand Down Expand Up @@ -24688,6 +24697,7 @@






</style>
Expand Down Expand Up @@ -24864,6 +24874,7 @@






</style>
Expand Down Expand Up @@ -25034,6 +25045,7 @@






</style>
Expand Down Expand Up @@ -25218,6 +25230,7 @@






</style>
Expand Down Expand Up @@ -25519,6 +25532,7 @@






</style>
Expand Down Expand Up @@ -26140,6 +26154,7 @@






</style>
Expand Down Expand Up @@ -26277,6 +26292,7 @@






</style>
Expand Down Expand Up @@ -26361,6 +26377,7 @@






</style>
Expand Down Expand Up @@ -27182,6 +27199,7 @@






</style>
Expand Down Expand Up @@ -27362,6 +27380,7 @@






</style>
Expand Down Expand Up @@ -27801,6 +27820,7 @@






</style>
Expand Down Expand Up @@ -28399,6 +28419,7 @@






</style>
Expand Down Expand Up @@ -28781,6 +28802,7 @@






</style>
Expand Down Expand Up @@ -29194,6 +29216,7 @@






</style>
Expand Down Expand Up @@ -29812,6 +29835,7 @@




</style>
</template>
<script>'use strict';
Expand Down Expand Up @@ -30119,6 +30143,7 @@






</style>
Expand Down Expand Up @@ -30400,6 +30425,7 @@






</style>
Expand Down Expand Up @@ -30627,6 +30653,7 @@






</style>
Expand Down Expand Up @@ -30791,6 +30818,7 @@






</style>
Expand Down Expand Up @@ -30958,6 +30986,7 @@






</style>
Expand Down Expand Up @@ -31119,6 +31148,7 @@






</style>
Expand Down Expand Up @@ -31280,6 +31310,7 @@






</style>
Expand Down Expand Up @@ -31441,6 +31472,7 @@






</style>
Expand Down Expand Up @@ -31667,6 +31699,7 @@






</style>
Expand Down
1 change: 1 addition & 0 deletions polymer/css/behaviors/fin-hypergrid-behavior-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@






1 change: 1 addition & 0 deletions polymer/css/behaviors/fin-hypergrid-behavior-default.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






1 change: 1 addition & 0 deletions polymer/css/behaviors/fin-hypergrid-behavior-gol.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






1 change: 1 addition & 0 deletions polymer/css/behaviors/fin-hypergrid-behavior-in-memory.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






1 change: 1 addition & 0 deletions polymer/css/behaviors/fin-hypergrid-behavior-json.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






1 change: 1 addition & 0 deletions polymer/css/behaviors/fin-hypergrid-behavior-q.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






1 change: 1 addition & 0 deletions polymer/css/behaviors/fin-hypergrid-behavior-qtree.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@




Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,6 @@






Loading

0 comments on commit fb9cae6

Please sign in to comment.