mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Rename getIntersection() -> getBestIntersection()
This commit is contained in:
parent
bfa0459c52
commit
4fac3ee6fc
1 changed files with 4 additions and 3 deletions
|
@ -595,7 +595,8 @@ PathItem.inject(new function() {
|
|||
// If there are multiple possible intersections, find the one
|
||||
// that's either connecting back to start or is not visited yet,
|
||||
// and will be part of the boolean result:
|
||||
function getIntersection(inter, strict) {
|
||||
function getBestIntersection(inter, strict) {
|
||||
var begin = inter;
|
||||
while (inter) {
|
||||
var seg = inter._segment,
|
||||
nextSeg = seg.getNext(),
|
||||
|
@ -681,8 +682,8 @@ PathItem.inject(new function() {
|
|||
+ ', other: ' + inter._segment._path._id + '.'
|
||||
+ inter._segment._index);
|
||||
}
|
||||
inter = inter && (getIntersection(inter, true)
|
||||
|| getIntersection(inter, false)) || inter;
|
||||
inter = inter && (getBestIntersection(inter, true)
|
||||
|| getBestIntersection(inter, false)) || inter;
|
||||
var other = inter && inter._segment;
|
||||
// A switched intersection means we may have changed the segment
|
||||
// Point to the other segment in the selected intersection.
|
||||
|
|
Loading…
Reference in a new issue