08.08.14, 15:24
hi i just wrote the following code and noticed that the result for lines with only two points differs from lines with more points.
var selectedItems = document.getItems({ selected: true });
selectedItems[0].strokeColor = 'red';
selectedItems[1].strokeColor = 'blue';
console.log("------------------------");
for(i=0; i<selectedItems.length; i++){
for(j=0; j<selectedItems.length; j++){
if(i!=j){
console.log("c ", i, j, selectedItems[i].contains(selectedItems[j]));
console.log("i ", i, j, selectedItems[i].intersects(selectedItems[j]));
}
}
}