From c02315f36b925d163b94880a5ae78558d079ee80 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Tue, 5 Aug 2014 13:03:04 +0200 Subject: [PATCH] remove normalize func not more used --- src/util/misc.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/util/misc.js b/src/util/misc.js index 5bf9de7c..e35439ab 100644 --- a/src/util/misc.js +++ b/src/util/misc.js @@ -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)