Skip to content

Commit

Permalink
more click events for qtree
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewirts committed Apr 23, 2015
1 parent 677060f commit 2047048
Show file tree
Hide file tree
Showing 40 changed files with 122 additions and 13 deletions.
66 changes: 60 additions & 6 deletions fin-hypergrid.dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -21353,6 +21353,7 @@






</style>
Expand Down Expand Up @@ -22459,6 +22460,7 @@






</style>
Expand Down Expand Up @@ -22712,6 +22714,7 @@






</style>
Expand Down Expand Up @@ -23018,6 +23021,7 @@






</style>
Expand Down Expand Up @@ -23324,6 +23328,7 @@






</style>
Expand Down Expand Up @@ -23668,6 +23673,7 @@






</style>
Expand Down Expand Up @@ -23788,6 +23794,7 @@






</style>
Expand All @@ -23798,7 +23805,7 @@

Polymer('fin-hypergrid-feature-cell-click', { /* jshint ignore:line */
handleTap: function(grid, event) {
grid.fireCellClickEvent(event);
grid.cellClicked(event);
if (this.next) {
this.next.handleTap(grid, event);
}
Expand Down Expand Up @@ -23977,6 +23984,7 @@






</style>
Expand Down Expand Up @@ -24641,6 +24649,7 @@






</style>
Expand Down Expand Up @@ -24937,6 +24946,7 @@






</style>
Expand Down Expand Up @@ -25137,6 +25147,7 @@






</style>
Expand Down Expand Up @@ -25331,6 +25342,7 @@






</style>
Expand Down Expand Up @@ -25539,6 +25551,7 @@






</style>
Expand Down Expand Up @@ -25864,6 +25877,7 @@






</style>
Expand Down Expand Up @@ -26509,6 +26523,7 @@






</style>
Expand Down Expand Up @@ -26670,6 +26685,7 @@






</style>
Expand Down Expand Up @@ -26778,6 +26794,7 @@






</style>
Expand Down Expand Up @@ -26848,6 +26865,10 @@
}
},

cellClicked: function(cell, event) {
this.grid.fireCellClickEvent(cell, event);
},

initColumnIndexes: function() {
var columnCount = this._getColumnCount();
var fixedColumnCount = this.getFixedColumnCount();
Expand Down Expand Up @@ -27651,6 +27672,7 @@






</style>
Expand Down Expand Up @@ -27859,6 +27881,7 @@






</style>
Expand Down Expand Up @@ -28322,6 +28345,7 @@






</style>
Expand Down Expand Up @@ -28947,6 +28971,7 @@






</style>
Expand Down Expand Up @@ -29394,6 +29419,7 @@






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






</style>
Expand Down Expand Up @@ -30345,6 +30372,20 @@
}
},

cellClicked: function(cell, event) {
var rowNum = cell.y - this.scrollPositionY;
var rows = this.block.Z[1].n_[rowNum];
var colId = this.getColumnId(cell.x);
var colClick = {
id: this.getNextMessageId(),
fn: 'cell',
col: colId,
row: rows
};
this.sendMessage(colClick);
this.grid.fireCellClickEvent(cell, event);
},

sendMessage: function(message) {
if (logMessages) {
console.dir('out-' + Date.now(), message);
Expand Down Expand Up @@ -30552,6 +30593,7 @@
getFixedColumnCount: function() {
return 1;
},

});

})(); /* jslint ignore:line */
Expand Down Expand Up @@ -30590,6 +30632,7 @@






</style>
Expand Down Expand Up @@ -30926,6 +30969,7 @@






</style>
Expand Down Expand Up @@ -31231,6 +31275,7 @@






</style>
Expand Down Expand Up @@ -31482,6 +31527,7 @@






</style>
Expand Down Expand Up @@ -31670,6 +31716,7 @@






</style>
Expand Down Expand Up @@ -31861,6 +31908,7 @@






</style>
Expand Down Expand Up @@ -32046,6 +32094,7 @@






</style>
Expand Down Expand Up @@ -32231,6 +32280,7 @@






</style>
Expand Down Expand Up @@ -32416,6 +32466,7 @@






</style>
Expand Down Expand Up @@ -32666,6 +32717,7 @@






</style>
Expand Down Expand Up @@ -34220,24 +34272,26 @@
this.synchronizeScrollingBoundries();
},

fireCellClickEvent: function(event) {
var behavior = this.getBehavior();
cellClicked: function(event) {
var hovered = this.getHoverCell();
var sy = this.getVScrollValue();
var x = hovered.x;
if (hovered.x > -1) {
x = behavior.translateColumnIndex(hovered.x + this.getHScrollValue());
}

if (hovered.y < 0) {
sy = 0;
}
hovered = rectangles.point.create(x, hovered.y + sy);
this.getBehavior().cellClicked(hovered, event);
},

fireCellClickEvent: function(cell, event) {
var behavior = this.getBehavior();

hovered = rectangles.point.create(x, hovered.y + sy);
var clickEvent = new CustomEvent('fin-cell-click', {
detail: {
cell: hovered,
cell: cell,
event: event,
time: Date.now()
}
Expand Down
2 changes: 1 addition & 1 deletion fin-hypergrid.min.html

Large diffs are not rendered by default.

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 @@ -61,5 +61,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 @@ -165,5 +165,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 @@ -165,5 +165,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 @@ -165,5 +165,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 @@ -165,5 +165,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 @@ -165,5 +165,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 @@ -165,5 +165,6 @@






Loading

0 comments on commit 2047048

Please sign in to comment.