Skip to content

Commit

Permalink
autoscrollAcceleration parameter added
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewirts committed Dec 17, 2015
1 parent 384d810 commit bb1da41
Show file tree
Hide file tree
Showing 42 changed files with 102 additions and 15 deletions.
54 changes: 48 additions & 6 deletions fin-hypergrid.dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -15443,6 +15443,7 @@






</style>
Expand Down Expand Up @@ -17229,6 +17230,7 @@






</style>
Expand Down Expand Up @@ -17599,6 +17601,7 @@






</style>
Expand Down Expand Up @@ -18016,6 +18019,7 @@






</style>
Expand Down Expand Up @@ -18546,6 +18550,7 @@






</style>
Expand Down Expand Up @@ -19046,6 +19051,7 @@






</style>
Expand Down Expand Up @@ -19188,6 +19194,7 @@






</style>
Expand Down Expand Up @@ -19403,6 +19410,7 @@






</style>
Expand Down Expand Up @@ -19706,7 +19714,7 @@
* @param {fin-hypergrid} grid - [fin-hypergrid](module-._fin-hypergrid.html)
*/
handleDOWNSHIFT: function(grid) {
var count = this.getAutoScrollAcceleration();
var count = this.getAutoScrollAcceleration(grid);
this.moveShiftSelect(grid, 0, count);
},

Expand All @@ -19719,7 +19727,7 @@
* @param {Object} event - the event details
*/
handleUPSHIFT: function(grid) {
var count = this.getAutoScrollAcceleration();
var count = this.getAutoScrollAcceleration(grid);
this.moveShiftSelect(grid, 0, -count);
},

Expand Down Expand Up @@ -19756,7 +19764,7 @@
* @param {Object} event - the event details
*/
handleDOWN: function(grid) {
var count = this.getAutoScrollAcceleration();
var count = this.getAutoScrollAcceleration(grid);
this.moveSingleSelect(grid, 0, count);
},

Expand All @@ -19769,7 +19777,7 @@
* @param {Object} event - the event details
*/
handleUP: function(grid) {
var count = this.getAutoScrollAcceleration();
var count = this.getAutoScrollAcceleration(grid);
this.moveSingleSelect(grid, 0, -count);
},

Expand Down Expand Up @@ -19804,7 +19812,10 @@
If we are holding down the same navigation key, accelerate the increment we scroll
* #### returns: integer
*/
getAutoScrollAcceleration: function() {
getAutoScrollAcceleration: function(grid) {
if (!grid.isAutoScrollAcceleration()) {
return 1;
}
var count = 1;
var elapsed = this.getAutoScrollDuration() / 2000;
count = Math.max(1, Math.floor(elapsed * elapsed * elapsed * elapsed));
Expand Down Expand Up @@ -20125,6 +20136,7 @@






</style>
Expand Down Expand Up @@ -20515,6 +20527,7 @@






</style>
Expand Down Expand Up @@ -20737,6 +20750,7 @@






</style>
Expand Down Expand Up @@ -20971,6 +20985,7 @@






</style>
Expand Down Expand Up @@ -21210,6 +21225,7 @@






</style>
Expand Down Expand Up @@ -21733,6 +21749,7 @@






</style>
Expand Down Expand Up @@ -22575,6 +22592,7 @@






</style>
Expand Down Expand Up @@ -22875,6 +22893,7 @@






</style>
Expand Down Expand Up @@ -22928,6 +22947,7 @@
}



</style>
</template>
<script>'use strict';
Expand Down Expand Up @@ -22972,6 +22992,7 @@
}



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






</style>
Expand Down Expand Up @@ -25030,6 +25052,7 @@






</style>
Expand Down Expand Up @@ -25281,6 +25304,7 @@






</style>
Expand Down Expand Up @@ -25913,6 +25937,7 @@






</style>
Expand Down Expand Up @@ -26741,6 +26766,7 @@






</style>
Expand Down Expand Up @@ -27631,6 +27657,7 @@






</style>
Expand Down Expand Up @@ -28208,6 +28235,7 @@






</style>
Expand Down Expand Up @@ -29448,6 +29476,7 @@






</style>
Expand Down Expand Up @@ -29936,6 +29965,7 @@






</style>
Expand Down Expand Up @@ -30421,6 +30451,7 @@






</style>
Expand Down Expand Up @@ -30746,6 +30777,7 @@






</style>
Expand Down Expand Up @@ -30959,6 +30991,7 @@






</style>
Expand Down Expand Up @@ -31180,6 +31213,7 @@






</style>
Expand Down Expand Up @@ -31383,6 +31417,7 @@






</style>
Expand Down Expand Up @@ -31586,6 +31621,7 @@






</style>
Expand Down Expand Up @@ -31789,6 +31825,7 @@






</style>
Expand Down Expand Up @@ -32058,6 +32095,7 @@






</style>
Expand Down Expand Up @@ -32167,7 +32205,8 @@
useHiDPI: true,
editorActivationKeys: ['alt', 'esc'],
columnAutosizing: true,
readOnly: false
readOnly: false,
autoScrollAcceleration: true

};
return properties;
Expand Down Expand Up @@ -33208,6 +33247,9 @@
return this.resolveProperty('useHiDPI') !== false;
},

isAutoScrollAcceleration: function() {
return this.resolveProperty('autoScrollAcceleration') !== false;
},
/**
* @function
* @instance
Expand Down
6 changes: 3 additions & 3 deletions 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 @@ -70,5 +70,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 @@ -174,5 +174,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 @@ -174,5 +174,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 @@ -174,5 +174,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 @@ -174,5 +174,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 @@ -174,5 +174,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 @@ -174,5 +174,6 @@






Loading

0 comments on commit bb1da41

Please sign in to comment.