remove normalize func not more used

This commit is contained in:
Andrea Bogazzi 2014-08-05 13:03:04 +02:00
parent 74f796fe3e
commit c02315f36b

View file

@ -505,26 +505,6 @@
return (String(fn).match(/function[^{]*\{([\s\S]*)\}/) || {})[1];
},
/**
* Normalizes polygon/polyline points according to their dimensions
* @param {Array} points
* @param {Object} options
*/
normalizePoints: function(points, options) {
var minX = fabric.util.array.min(points, 'x'),
minY = fabric.util.array.min(points, 'y');
minX = minX < 0 ? minX : 0;
minY = minX < 0 ? minY : 0;
for (var i = 0, len = points.length; i < len; i++) {
// normalize coordinates, according to containing box
// (dimensions of which are passed via `options`)
points[i].x -= (options.width / 2 + minX) || 0;
points[i].y -= (options.height / 2 + minY) || 0;
}
},
/**
* Returns true if context has transparent pixel
* at specified location (taking tolerance into account)