Update polyline.class.js

same for polygon