Closed christophknoth closed 10 years ago
Yes that's because currently close path combines the first and last segment if they are on the same point, merging their handles. Perhaps that's too much intelligence in a command that people are used to from other APIs already? Maybe this should happen if path.join() is called without any other argument?
The problem is that in a lot of paperjs examples a path is generated and then afterwards there is a loop that runs through the points and changes their coordinates. I tried to follow that and because I did not know the coordination at creation time of the path I set them all to 0,0. And finally I was wondering why I am missing a point.
I think that I only want to loose points when I command the library to do so. If not it is a bit like as if I am losing a variable because I set it to the same value as another one.
Yes I agree. I will see why I changed it this way and will move the "intelligence" to a better place. For now you can use path.closed = true
instead of path.closePath();
to avoid this behavior.
Caused by this change: 5ff911f68ca63a4e2b63440f0c82c4cf3d05db2e
If you create a new path and put all the points on the same coordinate and then use closePath, one point is missing.
http://sketch.paperjs.org/#S/tZBPi8IwEMW/SogHK5SS1HpRvCjePCy4t+0eQh3b4nRGmuAi4ndfE9hl/wQFwVuGvN+b9+YsyXQgp3KzB1c1MpUVb/18NL1A2LnVCdbGQi/mguBDvBjXJOeSSrdrEZeM3E/FcLAqdKEXw7Sky2h2/aWfaNbxEV45CTy35BKVCjXywl8ybOmZMh2VVcgWQqtIcAt1B+Tsm3rPDt7k6wrh7R21Uv8svykdpSbXvMUNKo9SuVJ3to3jGSfhPKFbxWQZIUOuk9s9M0M1gqfuM/oBJn+AGf9h5OUT