Commit graph

6799 commits

Author SHA1 Message Date
Jürg Lehni
97abd80bab Replace all occurences of Math.sqrt(2) with Math.SQRT2 2016-12-29 10:56:06 +01:00
Jürg Lehni
27a2757542 Merge pull request #1209 from iconexperience/patch-3
Fix length comparison in Path.compare()
2016-12-29 10:55:31 +01:00
Jürg Lehni
767a438286 Merge pull request #1210 from sapics/mini-patch
Replace nodejs version 5 to 6 in Travis
2016-12-29 09:34:05 +01:00
Jürg Lehni
44789fad88 Remove unnecessary imports. 2016-12-28 23:55:20 +01:00
Jürg Lehni
41f7e58ca9 Include issue number forgotten in previous commit. 2016-12-23 23:13:18 +01:00
Jürg Lehni
b59baeb9aa Fix stroke hit-testing for rounded shape items.
Closes #1207
2016-12-23 23:11:17 +01:00
Jürg Lehni
66305cbbaf Merge pull request #1217 from sapics/fix-documentation
Fix example in jsdoc
2016-12-18 21:41:42 -05:00
sapics
3f909da253 Fix example in jsdoc 2016-12-10 12:58:56 +09:00
sapics
01b62bc334 Replace nodejs version 5 to 6 in Travis 2016-12-03 17:43:36 +09:00
sapics
523251a288 Use Math.SQRT2 instead of Math.sqrt(2) 2016-12-03 17:32:50 +09:00
sapics
8e5b804d6e Fix typo in comment 2016-12-03 17:31:27 +09:00
Jan
1700a326b1 Fix length comparison in compare()
Path.compare() returned a wrong result if one of the paths were empty. This little change fixes the behaviour.
2016-12-02 16:06:18 +01:00
Jürg Lehni
4281800585 Added missing apostrophe.
Closes https://github.com/paperjs/paperjs.org/pull/25
2016-12-01 21:45:38 -05:00
Jürg Lehni
1f822b1faa Merge pull request #1155 from iconexperience/propagateWinding-pythagoras-fix
Use correct value for y 45 degree tangent
2016-11-28 18:50:11 -05:00
Jürg Lehni
63cb7bd536 Merge pull request #1193 from iconexperience/patch-1
Fix two issues in PathItem.compare()
2016-11-22 19:05:06 -05:00
Jürg Lehni
d779789b6f PaperScript: Prevent invalid JavaScript in assignment operators.
Closes #1151
2016-11-20 21:12:02 -05:00
Jürg Lehni
3c43a78c53 Properly handle generated IDs in SVG export.
Closes #1138
2016-11-20 20:53:41 -05:00
Jürg Lehni
8946f44ed9 Fix curve-bounds check in getIntersections()
Closes #1197
2016-11-20 20:19:38 -05:00
Jan
eef2297935 Fix two issues in compare()
Variable `count` was never initialized, so incrementing resulted in a NaN.
Creating `paths2` failed if `path._children` was `undefined`.
2016-11-04 15:09:28 +01:00
Jürg Lehni
6dd7cc5b6a Fix imprecision in Numerical.findRoot()
Results can be slightly outside of the range.
Close #1149
2016-09-24 15:39:09 -04:00
Jürg Lehni
80f6dbb5e3 Implement unit test for #1091
Closes #1091
2016-09-24 14:53:36 -04:00
Jürg Lehni
7dd0b852c8 Remove further unneeded GEOMETRIC_EPSILON curve-end checks. 2016-09-24 14:48:42 -04:00
Jürg Lehni
287f48a0db Implement unit test for #1165
Closes #1165
2016-09-24 14:34:46 -04:00
Jürg Lehni
b37b8cc495 Improve reliability of Curve.getIntersection()
Reduce epsilon when checking against curve end points from GEOMETRIC_EPSILON to EPSILON.

Coses #1174
2016-09-24 14:28:43 -04:00
Jürg Lehni
3eafd5256a Fix omission in recent renaming. 2016-09-24 14:17:20 -04:00
Jürg Lehni
620cc92379 Include pkg-config dependency on Debian / Ubuntu.
See #1173
2016-09-23 18:24:20 -04:00
Jürg Lehni
fbb0c59598 Always use un-scaled curve-time in divideLocations()
Fixes #1169
2016-09-23 06:55:12 -04:00
Jürg Lehni
d3ac1b4c94 Prevent CurveLocation#toString() calls in bitwise xor comparison.
See https://twitter.com/juerglehni/status/778962612197453824
2016-09-22 10:44:23 -04:00
Jürg Lehni
dbe3aa42ec Fix typo in error message. 2016-09-22 10:42:47 -04:00
Jürg Lehni
b4f6cde203 Tests: Handle null values when comparing items. 2016-09-20 18:43:02 -04:00
Jürg Lehni
3a49ac4015 Handle paths with only one segment in #resolveCrossings()
Closes #1167
2016-09-20 18:13:47 -04:00
Jürg Lehni
0af4c5c0f1 Introduce Curve#hasLength() as an optimized check for curve-length.
And use it where it make sense.

Relates to https://github.com/paperjs/paper.js/issues/1109#issuecomment-234352266
2016-09-20 17:59:56 -04:00
Jürg Lehni
56cfdd9ab6 Only use precommit and prepush hooks when working on develop branch.
This should solve @iconexperience's troubles outlined in https://github.com/paperjs/paper.js/issues/1116#issuecomment-244037792
2016-09-20 17:07:38 -04:00
Jürg Lehni
befac6b8da Update gulp-qunits to fix build problems on Node.js v4.5.0 2016-09-20 16:25:14 -04:00
Jan
3b8d3cc47d Use Math..SQRT1_2 instead of 0.7071
Makes code easier to understand.
2016-08-31 23:29:35 +02:00
Jan
f160e74936 Use correct value for y 45 degree tangent
I got the pythagoras wrong when I wrote this. The length of the tangent vector is 1, therefore the y component is sqrt(0.5) for 45°. This will not make any difference, but still we should use the correct value.
2016-08-31 10:05:47 +02:00
Jürg Lehni
6e7fe67a8d Implement unit tests for #1109. 2016-08-09 10:01:35 +02:00
Jürg Lehni
cecd95e039 SVG: Correctly handle multiple sequential move commands.
Closes #1134
2016-08-07 21:36:03 +02:00
Jürg Lehni
7a63afc769 Clean up Layer unit tests a bit. 2016-08-07 15:58:54 +02:00
Jürg Lehni
0396446c4c Boolean: Clean up previous fix. 2016-08-07 15:55:27 +02:00
Jürg Lehni
e3dae5f96f Merge pull request #1133 from sapics/remove-layer
Fix to remove named layer
2016-08-07 15:55:17 +02:00
sapics
31690cb6b6 Fix to remove named layer 2016-08-06 11:00:29 +09:00
Jürg Lehni
75a10fb246 Boolean: Clear branch so we start with a new one on the next contour. 2016-08-04 12:21:58 +02:00
Jürg Lehni
79661c35e6 Some code cleanup in View#setViewSize() 2016-08-03 13:33:58 +02:00
Jürg Lehni
91371c1b47 Keep view.bounds in sync during 'resize' events.
Closes #1127
2016-08-03 13:08:08 +02:00
Jürg Lehni
fa3456341c Fix view flickering during window resizes.
Closes #1126
2016-08-01 17:10:00 +02:00
Jürg Lehni
78c5c27bb3 Boolean: More work on new branching code.
It now checks all intersections when there are multiple options first.
2016-07-28 12:14:02 +02:00
Jürg Lehni
f4f4b3472f Minor code optimization. 2016-07-27 22:58:57 +02:00
Jürg Lehni
17cca2984b Boolean: Make sure we're actually comparing multiple intersections. 2016-07-27 22:57:08 +02:00
Jürg Lehni
4c12f1505c Clean up previous commit. 2016-07-27 21:48:55 +02:00