update viewport.js.