Update polyline.class.js

Mirror polygon changes