mirror of
https://github.com/svg/svgo.git
synced 2025-07-31 07:44:22 +03:00
Small spelling typo in mergePaths
This commit is contained in:
committed by
Aidan Steele
parent
d0c3355056
commit
dcab8e0c73
@ -602,7 +602,7 @@ function set(dest, source) {
|
|||||||
* @param {Array} path2 JS path representation
|
* @param {Array} path2 JS path representation
|
||||||
* @return {Boolean}
|
* @return {Boolean}
|
||||||
*/
|
*/
|
||||||
exports.interesects = function(path1, path2) {
|
exports.intersects = function(path1, path2) {
|
||||||
if (path1.length < 3 || path2.length < 3) return false; // nothing to fill
|
if (path1.length < 3 || path2.length < 3) return false; // nothing to fill
|
||||||
|
|
||||||
// Collect points of every subpath.
|
// Collect points of every subpath.
|
||||||
|
@ -12,7 +12,7 @@ exports.params = {
|
|||||||
|
|
||||||
var path2js = require('./_path.js').path2js,
|
var path2js = require('./_path.js').path2js,
|
||||||
js2path = require('./_path.js').js2path,
|
js2path = require('./_path.js').js2path,
|
||||||
interesects = require('./_path.js').interesects;
|
intersects = require('./_path.js').intersects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge multiple Paths into one.
|
* Merge multiple Paths into one.
|
||||||
@ -54,7 +54,7 @@ exports.fn = function(item, params) {
|
|||||||
prevPathJS = path2js(prevContentItem),
|
prevPathJS = path2js(prevContentItem),
|
||||||
curPathJS = path2js(contentItem);
|
curPathJS = path2js(contentItem);
|
||||||
|
|
||||||
if (equalData && !interesects(prevPathJS, curPathJS)) {
|
if (equalData && !intersects(prevPathJS, curPathJS)) {
|
||||||
js2path(prevContentItem, prevPathJS.concat(curPathJS), params);
|
js2path(prevContentItem, prevPathJS.concat(curPathJS), params);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user