mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
parent
999e8fe4d9
commit
e1961c2b91
2 changed files with 19 additions and 0 deletions
|
@ -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).
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue