Skip to content

Commit

Permalink
fixed issue #198
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyGermaneri committed Apr 4, 2019
1 parent a5069fc commit 5bf9258
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 12 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.22.10",
"version": "0.22.11",
"ignore": [
"**/.*",
"node_modules",
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2040
2041
14 changes: 11 additions & 3 deletions dist/canvas-datagrid.debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/canvas-datagrid.debug.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/canvas-datagrid.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/canvas-datagrid.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ define(['./defaults'], function (defaults) {
};
component.connectedCallback = function () {
var intf = this;
intf.parentDOMNode.innerHTML = "";
intf.parentDOMNode.appendChild(intf.canvas);
intf.connected = true;
component.observe(intf);
component.applyComponentStyle(true, intf);
Expand Down
7 changes: 4 additions & 3 deletions lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,13 @@ define([], function () {
self.parentIsCanvas = /^canvas$/i.test(self.parentDOMNode.tagName);
if (self.parentIsCanvas) {
self.canvas = self.parentDOMNode;
document.body.appendChild(self.controlInput);
} else {
self.canvas = document.createElement('canvas');
self.parentDOMNode.appendChild(self.canvas);
document.body.appendChild(self.controlInput);
if (self.intf.createShadowRoot) {
self.parentDOMNode.appendChild(self.canvas);
}
}
document.body.appendChild(self.controlInput);
self.createInlineStyle(self.canvas, 'canvas-datagrid');
self.ctx = self.canvas.getContext('2d');
self.ctx.textBaseline = 'alphabetic';
Expand Down
5 changes: 5 additions & 0 deletions lib/intf.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,11 @@ define([], function () {
return self.sizes;
}
});
Object.defineProperty(self.intf, 'parentDOMNode', {
get: function () {
return self.parentDOMNode;
}
});
Object.defineProperty(self.intf, 'input', {
get: function () {
return self.input;
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.22.10",
"version": "0.22.11",
"description": "Canvas based data grid web component. Capable of displaying millions of contiguous hierarchical rows and columns without paging or loading, on a single canvas element.",
"main": "./dist/canvas-datagrid.js",
"scripts": {
Expand Down

0 comments on commit 5bf9258

Please sign in to comment.