Fix grid size calculation in javascript widget.
Merge pull request #16 from joshdrake/master

Fix grid size calculation in javascript widget.