mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-19 11:01:08 +00:00
remove normalize func not more used
This commit is contained in:
parent
74f796fe3e
commit
c02315f36b
1 changed files with 0 additions and 20 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue