Implement unit test and changelog entry for #1064

Closes #1064.
This commit is contained in:
Jürg Lehni 2016-06-10 10:29:38 +02:00
parent 999e8fe4d9
commit e1961c2b91
2 changed files with 19 additions and 0 deletions

View file

@ -177,6 +177,7 @@ contribute to the code.
Webpack (#986).
- Improve hit-testing and `#contains()` checks on path with horizontal lines
(#819).
- Improve reliability of `Path#getInteriorPoint()` in rare edge-cases.
- Handle non-reversible matrices in `Item#hitTest()` (#617).
- Fix various issues with adding and removing of segments in paths (#815).
- Support bubbling up of `doubleclick` events on `Group` (#834).

View file

@ -294,3 +294,21 @@ test('CompoundPath#contains() (nested touching circles)', function() {
var cp = new CompoundPath([c1, c2]);
testPoint(cp, new Point(100, 200), true);
});
test('Path#contains() with Path#interiorPoint', function() {
var path = new paper.Path({
segments: [
[100, 100],
[150, 100],
[150, 180],
[200, 180],
[200, 100],
[250, 100],
[250, 200],
[100, 200]
],
closed: true
});
testPoint(path, path.interiorPoint, true,
'The path\'s interior point should actually be inside the path');
});