Simplify PathIntersections example.

This commit is contained in:
Jürg Lehni 2013-03-05 15:09:46 -08:00
parent 06beb0141b
commit c0392b837c

View file

@ -34,14 +34,12 @@
function showIntersections(path1, path2) { function showIntersections(path1, path2) {
var intersections = path1.getIntersections(path2); var intersections = path1.getIntersections(path2);
if (intersections.length) { for (var i = 0; i < intersections.length; i++) {
for (var j = 0; j < intersections.length; j++) { new Path.Circle({
new Path.Circle({ center: intersections[i].point,
center: intersections[j].point, radius: 5,
radius: 5, fillColor: '#009dec'
fillColor: '#009dec' }).removeOnMove();
}).removeOnMove();
}
} }
} }
</script> </script>