Skip to content

Commit

Permalink
Gridfader is now sized by its style and not by the window element. Th…
Browse files Browse the repository at this point in the history
…is will allow it to be embedded in other elements. Also added a character encoding to the demo file.
  • Loading branch information
xcjs committed Aug 30, 2014
1 parent 09e0a0c commit 80c2b7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gridfader.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ var GridFader = function(canvasId) {

var Environment = {
SetCanvasSize: function() {
self.canvas.height = window.innerHeight;
self.canvas.width = window.innerWidth;
self.canvas.height = self.canvas.clientHeight;
self.canvas.width = self.canvas.clientWidth;
}
};

Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<title>gridfader.js Demo</title>
<meta charset="utf-8" />

<style>
* {
Expand All @@ -18,6 +19,7 @@
#gridfader {
display: block;
height: 100%;
width: 100%;
}
</style>
</head>
Expand Down

0 comments on commit 80c2b7e

Please sign in to comment.