update viewport.js