Skip to content

Commit

Permalink
fixed offset bug, added publish info
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Germaneri committed Nov 30, 2016
1 parent 7e43f2e commit 54187df
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
22 changes: 20 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
{
"name": "canvasGrid",
"name": "canvas-datagrid",
"main": "lib/main.js",
"ignore": []
"version": "0.9.0",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"homepage": "https://github.com/TonyGermaneri/canvas-datagrid",
"authors": [
"Tony Germaneri <[email protected]>"
],
"description": "Canvas based data grid",
"keywords": [
"Datagrid",
"grid",
"canvas"
],
"license": "BSD"
}
8 changes: 4 additions & 4 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,8 @@ define([], function context() {
scrollBox.style.width = container.offsetWidth + 'px';
height = container.offsetHeight;
width = container.offsetWidth;
scrollBox.style.top = container.getBoundingClientRect().top + style.headerCellHeight + (style.headerCellBorderWidth * 2) + 'px';
scrollBox.style.left = container.getBoundingClientRect().left + 'px';
scrollBox.style.top = style.headerCellHeight + (style.headerCellBorderWidth * 2) + 'px';
scrollBox.style.left = '0px';
draw();
return true;
}
Expand Down Expand Up @@ -1360,13 +1360,13 @@ define([], function context() {
canvas = document.createElement('canvas');
ctx = canvas.getContext('2d');
container.style.padding = '0';
container.style.background = '#0F0';
container.style.backgroundColor = style.backgroundColor;
scrollBox.style.overflow = 'auto';
scrollBox.style.zIndex = '1';
[scrollBox, canvas, controlInput].forEach(function eachEle(el) {
el.style.position = 'absolute';
});
window.addEventListener('resize', resize);
window.addEventListener('resize', function () { requestAnimationFrame(resize); });
if (container.parentNode) {
container.parentNode.addEventListener('resize', resize);
}
Expand Down
24 changes: 20 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
{
"name": "canvas-datagrid",
"version": "0.9.0",
"description": "Canvas based data grid",
"author": "[email protected]",
"version": "0.0.1",
"private": false,
"license": "BSD"
"main": "./lib/main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/TonyGermaneri/canvas-datagrid.git"
},
"keywords": [
"canvas",
"datagrid",
"grid"
],
"author": "Tony Germaneri <[email protected]>",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/TonyGermaneri/canvas-datagrid/issues"
},
"homepage": "https://github.com/TonyGermaneri/canvas-datagrid#readme"
}

0 comments on commit 54187df

Please sign in to comment.