Commit graph

6033 commits

Author SHA1 Message Date
Jürg Lehni
a7a07fb6d5 Update JSDoc and do some documentation spring-cleaning.
- Convert from {@code ...} to shorter `...`
- Reformat some documentation comment blocks
- Update copyright notices
2015-12-30 21:55:19 +01:00
Jürg Lehni
7d25096de6 Fix new failing #isCrossing() test-case. 2015-12-30 21:55:19 +01:00
Jürg Lehni
12dbd3eb26 Add unit tests for isCrossing() and define a new, currently failing test. 2015-12-30 21:55:19 +01:00
Jürg Lehni
a20b0469d6 Correctly keep track of all straight curves that need their handles cleared at the end.
Closes #838
2015-12-30 21:55:19 +01:00
Jürg Lehni
b724a59901 Handle non-reversible matrix in Item#hitTest()
Closes #617
2015-12-30 21:55:18 +01:00
Jürg Lehni
f2f34c3b75 Some minor fixes in new #getItems() code. 2015-12-30 21:55:18 +01:00
Jürg Lehni
f2a44a5832 Remove Base#class again as it's causing issues in lookup tables. 2015-12-30 21:55:18 +01:00
Jürg Lehni
de532aac2f Implement control over recursive iteration in #getItems()
Closes #853.
2015-12-30 21:55:18 +01:00
Jürg Lehni
f95d6ab310 Fix bug in Item#getItems(function() {})
Closes #751
2015-12-30 21:55:18 +01:00
Jürg Lehni
08d75a48ff Fix issue again with param.overlapping in #getItems()
This time, properly!
Closes #751
2015-12-30 21:55:18 +01:00
Jürg Lehni
93a5e2d18c Refine some code comments. 2015-12-30 21:55:18 +01:00
Jürg Lehni
aa316ffc8c Avoid applying item._matrix twice in Item#intersects()
As suggested by @sapics.
Closes #847
2015-12-30 21:55:18 +01:00
Jürg Lehni
7592895445 Big overhaul of CurveLocation#isCrossing()
Improved to better handle touching curves and edge cases involving straight curves.

Closes #865
2015-12-30 21:55:18 +01:00
Jürg Lehni
306d8bae86 Clean up the new Item#reduce() code a bit. 2015-12-30 21:55:18 +01:00
Jürg Lehni
fec67617e1 Merge pull request #846 from iconexperience/reduce-fix
Make sure reduced item has no parent if original item had no parent.
Fix for #835
2015-12-30 21:55:18 +01:00
Jürg Lehni
b987590c71 Define documentation for excludeMatrix parameter. 2015-12-30 21:55:18 +01:00
Jürg Lehni
83b53cb9e0 Fix a few edge cases in cloning and copying of attributes. 2015-12-30 21:55:17 +01:00
Jürg Lehni
2fea40f86f Introduce new Item#copyAttributes() & #copyContent(), and revamp #clone() handling. 2015-12-30 21:55:17 +01:00
Jürg Lehni
463f50a0c1 Adjust comment by @iconexperience.
As outlined here: https://github.com/paperjs/paper.js/issues/854#issuecomment-167334294
2015-12-30 21:55:17 +01:00
Jürg Lehni
386632b0be Implement new version of #reorient() and merge with #resolveCrossings()
As proposed by @iconexperience in #854
2015-12-30 21:55:17 +01:00
Jürg Lehni
48c0988546 Implement support for SVG fill-rule attribute.
Relates to #858
2015-12-30 21:55:17 +01:00
Jürg Lehni
a5f05c90f5 Rename #windingRule to #fillRule.
...keeping deprecated aliases on Style and Item around for now.

Closes #858
2015-12-30 21:55:17 +01:00
Jürg Lehni
1d80c13b73 Clean up path intersection tests. 2015-12-30 21:55:17 +01:00
Jürg Lehni
086485dc95 Minor code clean-up. 2015-12-30 21:55:17 +01:00
Jürg Lehni
401877c6dc Fix the correct bubbling of doubleclick events.
Fixes #834.
2015-12-30 21:55:17 +01:00
Jürg Lehni
e3a27da7b2 Fix alt key combos on Chrome.
Relates to #860
2015-12-30 21:55:17 +01:00
Jürg Lehni
0badb3b3f4 A bunch of code clean-ups. 2015-12-30 21:55:16 +01:00
Jürg Lehni
248364aebc Fix @param description. 2015-12-30 21:55:16 +01:00
Jürg Lehni
99a29cf9f9 Update JSDoc. 2015-12-30 21:55:16 +01:00
Jürg Lehni
16d6edb724 Remove editor settings from project files since that's now handled by .editorconfig files. 2015-12-30 21:55:16 +01:00
Jürg Lehni
4ee3a76a74 Improve handling of special characters and control sequences. 2015-12-30 21:55:16 +01:00
Jürg Lehni
0346552bc6 Minor simplification. 2015-12-30 21:55:16 +01:00
Jürg Lehni
52edd72efb Refactor Key handling
- Rely on event.key / event.keyIdnetifier instead of event.keyCode
- Handle command key better on Chrome across all platforms (fixes #860)
- Improve documentation
2015-12-30 21:55:16 +01:00
Jürg Lehni
6a8a9ee374 Update JSDoc. 2015-12-30 21:55:16 +01:00
iconexperience
b19bc5aaf4 Smaller improvements in addCurveIntersections() 2015-12-30 21:55:16 +01:00
sapics
81a4d142f0 Fix shape.strokeBounds with strokeScaling is false 2015-12-30 21:52:34 +01:00
iconexperience
0e3ac9d7f4 Handle cases when point y is equal to y of horizontal curve in path 2015-12-30 21:52:34 +01:00
sapics
9c1c00c11e Minor minification 2015-12-30 21:52:34 +01:00
sapics
0050984d83 Remove unnecessary calculation 2015-12-30 21:52:34 +01:00
iconexperience
c0a5739254 Change addCurveIntersections() to handle cases when tDiff == 0 2015-12-19 10:48:31 +01:00
Jürg Lehni
5d6fa05373 Merge pull request #840 from sapics/travis-test
Add .travis.yml file
2015-12-16 19:02:05 +01:00
sapics
50a0549bcf Add travis 2015-12-02 13:44:29 +09:00
Jürg Lehni
1e72447a7d Minor comment change. 2015-11-12 10:12:46 +01:00
Jürg Lehni
8149fa830b Only rasterize an item's content if the resulting raster is not empty.
closes #828
2015-11-12 10:11:31 +01:00
Jürg Lehni
deafacdad0 Treat overlaps as crossings as well.
This solves https://github.com/paperjs/paper.js/issues/784#issuecomment-153085486 , simplifies code quite a bit, and does not cause any new issues.
2015-11-04 01:19:20 +01:00
Jürg Lehni
f32a1def6e Only complain about open paths in boolean ops when they are long enough. 2015-11-02 18:21:19 +01:00
Jürg Lehni
9a772678a8 Clean up #816 a bit.
Closes #815 also.
2015-10-28 22:17:44 +01:00
Jürg Lehni
96e0f9ef6c Merge pull request #816 from tjunnone/issue815
Issue 815: Cannot add segment to Path after removing last segment
2015-10-28 22:11:41 +01:00
Tomas Junnonen
09d4de6a1b Issue 815: Cannot add segment to Path after removing last segment
Fixed an issue where after removing the last segment of a path,
new segments cannot be re-added.

Added new Path Curve test cases to test the difference between
a path with one and no segments (zero curves in both cases), which
catches the bug.
2015-10-28 12:15:07 -04:00
Jürg Lehni
6c0faaf010 Use Base.pick() instead of null check. 2015-10-27 23:43:14 +01:00