Update polygon.class.js

try to solve merge conflicts