mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
parent
3e19a96c46
commit
60f9d868a6
2 changed files with 11 additions and 1 deletions
|
@ -2546,7 +2546,7 @@ new function() { // PostScript-style drawing commands
|
|||
}
|
||||
vector = from.subtract(center);
|
||||
extent = vector.getDirectedAngle(to.subtract(center));
|
||||
var centerSide = line.getSide(center);
|
||||
var centerSide = line.getSide(center, true);
|
||||
if (centerSide === 0) {
|
||||
// If the center is lying on the line, we might have gotten
|
||||
// the wrong sign for extent above. Use the sign of the side
|
||||
|
|
|
@ -628,3 +628,13 @@ test('Path#add() with a lot of segments (#1493)', function() {
|
|||
path.clone();
|
||||
expect(0);
|
||||
});
|
||||
|
||||
test('Path#arcTo(through, to) is on through point side (#1477)', function() {
|
||||
var p1 = new Point(16, 21.5);
|
||||
var p2 = new Point(22.5, 15);
|
||||
var p3 = new Point(16.000000000000004, 8.5);
|
||||
var path = new Path();
|
||||
path.add(p1);
|
||||
path.arcTo(p2, p3);
|
||||
equals(true, path.segments[1].point.x > p1.x);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue