Fixed JS breakage due to undefined variable, viewPortLeft.
Merge pull request #2642 from b4oshany/master

Fixed JS breakage due to undefined variable, viewPortLeft.