sapics
f50a81e089
Minor code minifier
...
We can minify some codes which relate matrix.decompose(),
because matrix.decompose() must return non-null object
2018-10-20 15:14:41 +02:00
Jürg Lehni
c41509479f
Use separate ChangeFlag for matrix changes
...
See https://github.com/paperjs/paper.js/pull/1552#issuecomment-429547010
2018-10-13 16:44:35 +02:00
Jürg Lehni
5d00c30ece
Some internal refactoring.
2017-06-07 16:56:44 +02:00
Jürg Lehni
b26b056522
Prevent consumed properties in object literal constructors from being set on the instance.
...
We need to make sure arguments.__filtered survives constructor calls.
2017-04-22 13:52:03 +02:00
Jürg Lehni
e46c8ec340
Overhaul the caching of bounds and matrix decomposition.
...
Improves reliability of Item#rotation and #scaling and fixes situations caused by wrongly cached #position and #bounds values.
2017-04-22 12:55:42 +02: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
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
69fb23d2ed
Docs: Fix parameter sequence in Matrix constructor.
...
Closes #1273
2017-03-10 15:52:19 +01:00
Jürg Lehni
7a3e903b4d
Add Line#getSignedDistance()
2017-03-08 14:12:49 +01:00
Jürg Lehni
1fad295600
Facilitate minification.
2017-03-07 12:34:59 +01:00
Jürg Lehni
b40efbf6db
Fix Line#getSide() imprecisions when points are on the line.
2017-02-22 17:41:51 +01:00
Jürg Lehni
23202d0c80
Some code optimizations and cleanup.
2017-02-11 21:25:42 +01:00
iconexperience
af7b22a708
Add Line.getDistance() and use it in Curve.getOverlaps()
2017-02-07 16:15:41 +01:00
Jürg Lehni
771bb61038
Fix matrix cloning for groups with #applyMatrix = false
...
Closes #1225
2016-12-30 13:25:08 +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
becac4c921
Use shorter zero checks for array indices and length.
...
Keeping === 0 for mathematical algorithms seems clearer.
2016-07-22 13:46:24 +02:00
Jürg Lehni
32d8c969fb
Clean up handling of #_set(), #set() and #initialize()
...
Convention:
- #_set() is for actually setting properties, e.g. on Point, Size, so that derived classes can reuse other parts (e.g. SegmentPoint)
- #set() is a shortcut to #initialize() on all basic types, to offer the same amount of flexibility when setting values.
2016-07-18 20:11:01 +02:00
Jürg Lehni
de8b626033
Add tolerance argument to Path#join(path, tolerance)
2016-06-11 12:41:23 +02:00
Jürg Lehni
715025725d
Improve handling of SymbolItem bounds with #applyMatrix = false.
...
Closes #1070
2016-06-10 21:32:22 +02:00
Jürg Lehni
9aa29e0afc
Add support for construction from strings to Point and Size.
2016-05-27 11:37:19 +02:00
Jürg Lehni
681d5537b3
Always pass on dictionary object in _serialize()
...
It is used to determine if ojects can be serialized in compact form.
2016-05-04 18:06:18 -07:00
Jürg Lehni
345730f634
Merge pull request #1002 from sapics/curve-divide
...
Call curve._changed at curve.divideAtTime
2016-04-06 20:24:55 -07:00
Jürg Lehni
fc03e042f9
Some minor code and comment cleanup.
2016-03-28 07:59:55 -07:00
Jürg Lehni
3b71de9544
Fix #980 : Implement visual selection of item.position
2016-03-17 14:15:28 +01:00
Jürg Lehni
00b2102b6d
More clean-up of selection handling refactoring.
2016-03-17 13:36:02 +01:00
Jürg Lehni
f0edcd31b0
Fix #769 : Implement Item#selection flags to separate selection from item and bounds.
2016-03-17 13:02:26 +01:00
sapics
60f1e78889
Call curve._changed at curve.divideAtTime
2016-03-05 12:23:02 +09:00
Jürg Lehni
1db419a87b
Rename SegmentSelection related internal objects and properties.
...
Relates to #769 , #980
2016-02-26 16:31:50 +01:00
Jürg Lehni
6df4602b2b
Fix #977 : Implement unit-tests.
2016-02-16 20:52:07 +01:00
Jürg Lehni
08e51b5ca4
Fix failing SVG unit test.
2016-02-15 08:42:59 +01:00
Jürg Lehni
3ee46ffc5c
Matrix: Switch to a better implementation of #decompose()
...
This now also correctly handles skewing in SVG export.
2016-02-14 10:59:57 +01:00
Jürg Lehni
e35a55fe66
Flip Matrix properties #b and#c
...
Their definition was reversed from almost all other Matrix implementations I've encountered.
2016-02-14 10:53:10 +01:00
Jürg Lehni
a38834b81d
Further refined code from 095cd47c1c
2016-01-26 16:59:27 +01:00
sapics
095cd47c1c
Minifier matrix._transformCoordinates function
2016-01-26 12:07:34 +09:00
Jürg Lehni
e4b03a7915
More code cleanup and simplifications in Matrix.
...
Relates to #915
2016-01-19 10:14:20 +01:00
sapics
627a63cc5b
Fix matrix invert calculation
2016-01-19 16:08:39 +09:00
Jürg Lehni
40551fcacf
Make Matrix#orNullIfIdentity() private too, and fix error introduced by previous commit.
2016-01-17 19:34:54 +01:00
Jürg Lehni
d292e08ed2
Various renaming and introduction of additional methods in Matrix
...
- Rename Matrix#concatenate() to #append() and #preConcatenate() to #prepend().
- Over #invert() as alternative to #inverted(), directly modifying the matrix.
- Make Matrix#_shiftless() and internal function.
- Introduce versions that return copies instead, named #appended(). (previously #chain()) and #prepended().
- Rename internal Path#_getPenPadding() to #_getStrokePadding().
2016-01-17 19:30:47 +01:00
Jürg Lehni
36cb88de4d
Write documentation for Project#addLayer() and #insertLayer()
...
Closes #903
2016-01-16 16:51:47 +01:00
Jürg Lehni
3a3d46692b
Give view proper Matrix transformation functions, just like on Item.
...
Relates to #832
2016-01-16 15:10:28 +01:00
Jürg Lehni
16e42c68fd
Various minor documentation fixes (mainly capitalization).
2016-01-15 23:22:08 +01:00
Jürg Lehni
31297c359a
Update JSDoc.
...
Now with proper Markdown support!
2016-01-15 17:21:49 +01:00
Jürg Lehni
d5f2ff479d
Further overhaul and streamline handling of view and tool mouse-events.
2016-01-14 02:08:33 +01:00
Jürg Lehni
4830562e4f
Tweak documentation added to Point / Size #min() / #max() a bit.
2016-01-10 18:13:11 +01:00
Jürg Lehni
7b29bb177d
Merge remote-tracking branch 'megawac/526-reduce' into megawac-526-reduce
2016-01-10 18:06:11 +01:00
Jürg Lehni
e8390a76d8
Define Path#toShape() and Shape#toPath() as aliases to #clone().
2016-01-09 12:08:47 +01:00
Jürg Lehni
f2ae7840cf
A lot of work on documentation.
...
- @values lists
- Improve event documentation
- Compound path
- etc.
2016-01-08 20:45:54 +01:00
Jürg Lehni
56869baaad
Only transform canvas if matrix is not the identity.
2016-01-07 22:07:26 +01:00
Jürg Lehni
b9c76f44e8
Convert "Note: " comments to "NOTE: " and do some cleanup.
2016-01-06 14:23:19 +01:00
Jürg Lehni
7152942719
Replace links to issues with short references.
2016-01-06 14:13:02 +01:00