Update js/grid.base.js

small improvements in `getOffset` method
Merge pull request #416 from OlegKi/master

small improvements in getOffset method