Jürg Lehni
ffa7e16f48
Use == false
instead of === false
for all options that default to true.
...
These expression are true:
- false == false
- false == 0
While these are false:
- false == null
- false == undefined
2017-03-22 14:42:11 +01:00
Jürg Lehni
dd56f86679
Boolean: Pass on options in PathItem#subtract(path, options)
...
Relates to #1221
2017-03-22 14:24:40 +01:00
Jürg Lehni
7e8e04351f
Boolean: small optimization in computeStrokeBoolean()
2017-03-22 14:24:11 +01:00
Jürg Lehni
89d0536783
Scene Graphs: Do not allow inserting same item as child multiple times.
2017-03-21 11:55:42 +01:00
Jürg Lehni
29de03dc30
Node.js: Add code to handle separate shim modules.
...
Planend are the modules paper-jsdom and paper-jsdom-canvas, as shim modules that require and handle the dependencies as peer dependencies.
Relates to #1252
2017-03-20 12:38:52 +01:00
Jürg Lehni
48e9ef62a6
Boolean: Bring back on-path winding handling.
...
Relates to #1281
2017-03-20 01:02:12 +01:00
Jürg Lehni
49fca5510e
Improve handling of Rectangle dimension properties.
...
Better deal with left / top / right / bottom / center values, and implement more unit tests for their behavior.
Closes #1147
2017-03-19 22:51:34 +01:00
Jürg Lehni
ab45002003
Tests: Clean up Rectangle unit tests.
2017-03-19 19:26:07 +01:00
Jürg Lehni
f5c8cd094c
Node.js: Move all dependencies to optionalDependencies
...
Closes #1171
2017-03-19 16:17:43 +01:00
Jürg Lehni
5c3e3ec34c
Mouse Events: Improve mousedrag handling.
...
Relates to #1247 , closes #1286
2017-03-19 16:15:34 +01:00
Jürg Lehni
7a2ccc6d44
More work on supporting hybrid contexts.
...
Relates to #1252
2017-03-19 16:03:29 +01:00
Jürg Lehni
89a953dde0
Docs: Add documentation for options.bound and options.matrix in #exportSVG()
...
Closes #1254
2017-03-19 14:50:59 +01:00
Jürg Lehni
e354bccf69
Include note about compiling for Electron.
...
And some smaller forgotten changes.
Closes #1276
2017-03-19 14:38:24 +01:00
Jürg Lehni
26993b2c36
Various minor improvements to getWinding()
2017-03-19 14:18:55 +01:00
Jürg Lehni
374107c439
Minor cleanup for previous commit.
2017-03-18 16:46:55 +01:00
Jürg Lehni
fdd42076f9
Intersections: Bring back special handling of curve end-points.
...
Revert commit 89e31dd393
, and add further improvements:
- Implement unit tests for #1284
- Remove Rectangle#touches(rect) in favor of #intersects(rect, epsilon)
Closes #1284
2017-03-18 16:42:55 +01:00
Jürg Lehni
993afe3c83
Tests: Implement unit tests for #1277
2017-03-12 11:11:14 +01:00
Jürg Lehni
0ec06e7353
PaperScript: Give global.acorn the preference over the bundled one.
...
So people can load their own preferred version in sketch.paperjs.org
Relates to #1183
2017-03-11 20:53:35 +01:00
Jürg Lehni
29e7aba587
Prevent cleaning pre-existing styles when setting item.style to an object.
...
Until v0.10.2, doing so would merge in the new styles. We should keep this behavior for reasons of compatibility.
Closes #1277
2017-03-11 16:26:18 +01:00
Jürg Lehni
9a2f138f1d
PaperScript: Fix positive unary operator.
2017-03-11 00:27:03 +01:00
Jürg Lehni
6ee59cd46e
Prevent leakage of bundled Acorn into window.acorn
...
And fix Acorn loading under load.js
2017-03-10 23:56:06 +01:00
Jürg Lehni
62a0c9c36b
Revert accidental condition sequence change.
...
`typeof module` needs to come before 2nd condition.
2017-03-10 23:21:21 +01:00
Jürg Lehni
69fb23d2ed
Docs: Fix parameter sequence in Matrix constructor.
...
Closes #1273
2017-03-10 15:52:19 +01:00
Jürg Lehni
5dafc67278
Support newer, external versions of Acorn.js for PaperScript parsing, opening the doors to ES 2015.
...
Closes #1183 , closes #1275
2017-03-10 15:41:35 +01:00
Jürg Lehni
f2e9fab264
Split Item#copyTo() into #addTo() and #copyTo()
2017-03-10 11:43:55 +01:00
Jürg Lehni
5291043a5f
Fix how gradient matrices are handled when Item#applyMatrix = false
...
Closes #1238
2017-03-09 14:31:41 +01:00
Jürg Lehni
920cbaca99
Remove unused palettes array.
2017-03-09 12:50:43 +01:00
Jürg Lehni
083a09604d
Hit-Tests: Fix issue with non-invertible matrices.
...
Closes #1271
2017-03-09 12:42:11 +01:00
Jürg Lehni
3ffd7c4ac2
Add "paperjs" as package keyword.
2017-03-08 23:49:45 +01:00
Jürg Lehni
e145b1d4c2
Mouse Events: Only handle dragItem if the hitItem responds to mousedrag events.
...
Closes #1247
2017-03-08 23:42:03 +01:00
Jürg Lehni
f9d06d8ae4
Hit Tests: Implement options.position.
...
Closes #1249
2017-03-08 23:01:12 +01:00
Jürg Lehni
db4deb244f
Fix calculation of internal bounds with children and applyMatrix = false
...
Closes #1250
2017-03-08 17:14:42 +01:00
Jürg Lehni
65da4fe3ed
Clear parent's bounds cache when item's visibility changes.
...
Closes #1248
2017-03-08 16:21:34 +01:00
Jürg Lehni
26bf4f4749
Change getWinding() to include recommendation by @iconexperience
...
See https://github.com/paperjs/paper.js/issues/1261#issuecomment-283325168
Closes #1261
2017-03-08 15:55:51 +01:00
Jürg Lehni
cbc873cfd8
Merge pull request #1265 from iconexperience/new-unite-tests
...
Add some unit tests for boolean unite operations
2017-03-08 15:47:54 +01:00
Jürg Lehni
677c073c84
Use GEOMETRIC_EPSILON instead of EPSILON in Path#arcTo()
2017-03-08 14:13:19 +01:00
Jürg Lehni
7a3e903b4d
Add Line#getSignedDistance()
2017-03-08 14:12:49 +01:00
Jürg Lehni
155d5b879c
Improve Path._addSquareCap() for use in path offsetting code.
2017-03-08 13:41:23 +01:00
Jürg Lehni
6bc24c42c9
Change Log: Forgot to remove "Unreleased" for v0.010.3
2017-03-08 10:48:03 +01:00
Jürg Lehni
9bc312c1fe
Switch back to load.js versions on develop branch.
2017-03-08 10:44:54 +01:00
Jürg Lehni
b587e0b5b8
Release version 0.10.3
2017-03-08 10:44:43 +01:00
Jürg Lehni
36e60989b9
Change Log: Some improvements and cleanup.
2017-03-08 10:43:28 +01:00
Jürg Lehni
5ea09c2fa2
Tests: Implement unit test for #1270 .
...
Closes #1270 .
2017-03-07 20:57:47 +01:00
Jürg Lehni
fd797425e0
Tests: Fix unit test for #1239 .
...
Adjust for increase of found intersections since ecc1edb6ea
.
2017-03-07 20:15:59 +01:00
Jürg Lehni
22bda0972d
Intersections: Remove now unnecessary code.
...
Thanks to Curve#classify(), self-intersections are always in sequence.
2017-03-07 20:13:32 +01:00
Jürg Lehni
89e31dd393
Intersections: No more need for the special handling of curve end-points.
2017-03-07 20:11:04 +01:00
Jürg Lehni
ecc1edb6ea
Revert d204175d39
...
Revert fat-line clipping optimization that checked for straight curves, as unfortunately it wasn't reliable in many edge cases.
Relates to #1263
2017-03-07 20:01:05 +01:00
Jürg Lehni
867d0874dc
Tests: Implement unit test for #1269 .
...
Closes #1269 .
2017-03-07 17:41:37 +01:00
Jürg Lehni
8461d8d9f4
Curve Intersection: Improve algorithm to work with correct version of isStraight()
...
Relates to #1269
2017-03-07 17:41:16 +01:00
Jürg Lehni
bad4d02766
Fix Curve#isStraight() to correctly consider handles.
...
Also include code that prevents Curve.getIntersections() from failing now. Work in progress. Relates to #1269
2017-03-07 14:13:39 +01:00