Skip to content

Commit

Permalink
36 and 42 added
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewirts committed Jul 28, 2015
1 parent bb99825 commit 78a9847
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/bclys/fin-hypergrid.min.html

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions examples/bclys/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script src="accounting.min.js"></script>
<script src="sampledata.js"></script>
<link rel="import" href="fin-hypergrid.min.html">
<!-- <link rel="import" href="../../polymer/html/fin-hypergrid.html"> -->
<style>
.abs {
position: absolute;
Expand Down Expand Up @@ -134,10 +135,10 @@
});

jsonGrid.addFinEventListener('fin-click', function(e){
// var cell = e.detail.gridCell;
// if (cell.x === 2) {
// jsonGrid.activateEditor(cell.x, cell.y);
// }
var cell = e.detail.gridCell;
if (cell.x === 2 && cell.y > 1) {
jsonGrid.activateEditor(cell.x, cell.y);
}
});

jsonGrid.addFinEventListener('fin-header-click', function(e){
Expand Down Expand Up @@ -175,7 +176,16 @@
});

jsonGrid.addFinEventListener('fin-keydown', function(e) {
console.log('fin-keydown', e);
var key = e.detail.char;
if (key === 'RETURN') {
//move the cursor one space to the right
jsonGrid.moveSingleSelect(1,0);
} else if (key === 'TAB') {
//select the bottom right most cell and scroll there
jsonGrid.selectCell(jsonGrid.getColumnCount()-1, jsonGrid.getRowCount()-1);
jsonGrid.scrollBy(jsonGrid.getColumnCount(), jsonGrid.getRowCount());
}
console.log(e);
});


Expand Down
5 changes: 4 additions & 1 deletion examples/bclys/sampledata.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

(function() {
var numRows = 100000;
var numRows = 10000;

var firstNames = ['Olivia', 'Sophia', 'Ava', 'Isabella', 'Boy', 'Liam', 'Noah', 'Ethan', 'Mason', 'Logan', 'Moe', 'Larry', 'Curly', 'Shemp', 'Groucho', 'Harpo', 'Chico', 'Zeppo', 'Stanley', 'Hardy'];
var lastNames = ['Wirts', 'Oneil', 'Smith', 'Barbarosa', 'Soprano', 'Gotti', 'Columbo', 'Luciano', 'Doerre', 'DePena'];
Expand Down Expand Up @@ -44,4 +44,7 @@
data.push(randomPerson());
}
window.people = data;
window.states = states;
window.firstNames = firstNames;
window.lastNames = lastNames;
})();

0 comments on commit 78a9847

Please sign in to comment.