mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -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
|
// If there are multiple possible intersections, find the one
|
||||||
// that's either connecting back to start or is not visited yet,
|
// that's either connecting back to start or is not visited yet,
|
||||||
// and will be part of the boolean result:
|
// and will be part of the boolean result:
|
||||||
function getIntersection(inter, strict) {
|
function getBestIntersection(inter, strict) {
|
||||||
|
var begin = inter;
|
||||||
while (inter) {
|
while (inter) {
|
||||||
var seg = inter._segment,
|
var seg = inter._segment,
|
||||||
nextSeg = seg.getNext(),
|
nextSeg = seg.getNext(),
|
||||||
|
@ -681,8 +682,8 @@ PathItem.inject(new function() {
|
||||||
+ ', other: ' + inter._segment._path._id + '.'
|
+ ', other: ' + inter._segment._path._id + '.'
|
||||||
+ inter._segment._index);
|
+ inter._segment._index);
|
||||||
}
|
}
|
||||||
inter = inter && (getIntersection(inter, true)
|
inter = inter && (getBestIntersection(inter, true)
|
||||||
|| getIntersection(inter, false)) || inter;
|
|| getBestIntersection(inter, false)) || inter;
|
||||||
var other = inter && inter._segment;
|
var other = inter && inter._segment;
|
||||||
// A switched intersection means we may have changed the segment
|
// A switched intersection means we may have changed the segment
|
||||||
// Point to the other segment in the selected intersection.
|
// Point to the other segment in the selected intersection.
|
||||||
|
|
Loading…
Reference in a new issue