mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
parent
efcdd7bda8
commit
1efa0edb50
4 changed files with 15 additions and 3 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 16a58d078c5b72070aa34f1795807361098246d6
|
||||
Subproject commit 0fb6283f0955b8ee92fc9ac8838f167ea4a965d2
|
|
@ -1 +1 @@
|
|||
Subproject commit 3d396c63ecbe01d197b6bf3c6129823331f403d4
|
||||
Subproject commit 1e276564106e5a29a6e00115c7e703cfc1fc2b09
|
|
@ -722,7 +722,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
|||
matched = [],
|
||||
count = 0;
|
||||
ok = true;
|
||||
var boundsOverlaps = CollisionDetection.findBoundsOverlaps(paths1, paths2, Numerical.GEOMETRIC_EPSILON);
|
||||
var boundsOverlaps = CollisionDetection.findItemBoundsCollisions(paths1, paths2, Numerical.GEOMETRIC_EPSILON);
|
||||
for (var i1 = length1 - 1; i1 >= 0 && ok; i1--) {
|
||||
var path1 = paths1[i1];
|
||||
ok = false;
|
||||
|
|
|
@ -165,4 +165,16 @@ test('PathItem#compare()', function() {
|
|||
equals(function() {
|
||||
return circle2.compare(circle);
|
||||
}, true, 'Comparing a circle with additional segments with an identical circle should return true.');
|
||||
|
||||
var compoundPath1 = PathItem.create('M50,300l0,-150l50,25l0,-75l200,0l0,200z M100,200l50,0l-50,-25z');
|
||||
var compoundPath2 = PathItem.create('M50,300l0,-150l50,25l0,-75l200,0l0,200z M100,175l0,25l50,0z');
|
||||
var compoundPath3 = PathItem.create('M50,300l0,-150l50,25l0,-75l200,0l0,210z M100,200l50,0l-50,-25z');
|
||||
|
||||
equals(function() {
|
||||
return compoundPath1.compare(compoundPath2);
|
||||
}, true, 'Comparing two compound paths with one child starting at a different point should return true.');
|
||||
equals(function() {
|
||||
return compoundPath1.compare(compoundPath3);
|
||||
}, false, 'Comparing two compound paths with one child having a different shape should return false.');
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue