kangax/fabric.js — pull request #446 by nexttech (2013-02-25 22:41:02+00:00)
Title: Update dist/all.js

This change seems to work well for polygons. Also I didn't do it yet, but the below code can be incorporated into the export svg function to properly export them.

var offsetX = this.minX + this.width / 2,
offsetY = this.minY + this.height / 2;
var points = [];
for (var i = 0, len = this.points.length; i < len; i++) {
points.push(toFixed(this.points[i].x - offsetX, 2), ',', toFixed(this.points[i].y- offsetY, 2), ' ');