Update layout.js

Fixed the point select issue.