Skip to content

Commit

Permalink
fixed scroll with very few tall rows not working bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Germaneri committed Jan 18, 2017
1 parent e9bb927 commit 384b4e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "canvas-datagrid",
"main": "lib/main.js",
"version": "0.9.27",
"version": "0.9.28",
"ignore": [
"**/.*",
"node_modules",
Expand Down
4 changes: 2 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@
if (value > scrollHeight) {
value = scrollHeight;
}
if (scrollHeight <= height) {
if (scrollHeight + (sHeight * 0.5) <= sHeight) {
value = 0;
}
scrollTop = value;
Expand All @@ -2364,7 +2364,7 @@
if (value > scrollWidth) {
value = scrollWidth;
}
if (scrollWidth <= width) {
if (scrollWidth <= sWidth) {
value = 0;
}
scrollLeft = value;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canvas-datagrid",
"version": "0.9.27",
"version": "0.9.28",
"description": "Canvas based data grid",
"main": "./lib/main.js",
"scripts": {
Expand Down

0 comments on commit 384b4e8

Please sign in to comment.