Alex Lockwood
d51bb3fa31
Fix documentation for Shape#toPath()
2017-09-04 11:13:15 -04:00
Jürg Lehni
5d00c30ece
Some internal refactoring.
2017-06-07 16:56:44 +02:00
Jürg Lehni
188c006197
Update to straps.js v3.0.1 and make all functions and accessors enumerable.
2017-04-22 18:50:53 +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
7dea96c6f2
Docs: Fix wrong @link references to bean properties.
2017-04-13 12:24:56 +02:00
Jürg Lehni
d436d07fee
Intersections: Correctly handle item#applyMatrix = false
...
Closes #1289
2017-03-23 13:13:32 +01:00
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
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
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
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
083a09604d
Hit-Tests: Fix issue with non-invertible matrices.
...
Closes #1271
2017-03-09 12:42:11 +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
e3c6245979
Docs: Improve description of option.class value in #hitTest()
...
See #632
2017-02-15 16:11:33 +01:00
Jürg Lehni
13f4773985
Fix documentation of Project#hitTestAll()
...
Relates to #536
2017-02-06 18:36:00 +01:00
Jürg Lehni
da52f1f685
Remove Numerical.TOLERANCE
2017-01-16 17:48:26 +01:00
Jürg Lehni
0ae2ded9cc
Fix handling of hit-test tolerance on scaled items with #applyMatrix = false
...
Closes #1195
2017-01-08 14:34:58 +01:00
Jürg Lehni
ed38634a80
Improve comments.
2017-01-03 13:41:26 +01:00
Jürg Lehni
4d81a292a2
Return correct values for #rotation and #scaling on items with #applyMatrix = true
...
While preserving caching for #applyMatrix = false
Relates to #1004 , #1177
2017-01-03 13:39:35 +01:00
Jürg Lehni
aa75374406
Bring back caching of Item#rotation and #scaling
...
But only allow matrix decomposition based properties on items with #applyMatrix = false
Closes #1177 , relates to #1004
2017-01-03 13:23:44 +01:00
Jürg Lehni
e24402542a
Improve handling of SymbolItem in#hitTestAll()
...
Closes #1199
2017-01-01 18:32:45 +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
sapics
3f909da253
Fix example in jsdoc
2016-12-10 12:58:56 +09:00
sapics
31690cb6b6
Fix to remove named layer
2016-08-06 11:00:29 +09:00
Jürg Lehni
3f76bd99ef
Implement an efficient mechanism to prioritize key in Item#set()
...
Closes #1096
2016-07-25 23:17:45 +02:00
Jürg Lehni
eab0b9db5e
Correctly handle path.replaceWith(path) calls.
...
Closes #1118
2016-07-22 23:29:33 +02: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
a0417040f8
Improve handling of sub-path orientation in CompoundPath.
...
Remove automatic orientation on insertion, as it caused more troubles than solved problems, in favor of the new PathItem#reorient() method, or the even-odd fill-rule.
Closes #590 , #1029
2016-07-21 15:21:45 +02:00
Jürg Lehni
f874b927bf
Reflect View#zoom through matrix decomposition, and implement additional decomposed properties.
...
Closes #1107
2016-07-20 00:04:24 +02:00
Jürg Lehni
e539633852
Implement new and shorter segments array notation.
...
Supporting:
- Closing paths by including `true` as the last entry
- Nested segment arrays that can be passed to PathItem.create() and the CompoundPath constructor to create all sub-paths
2016-07-19 13:08:21 +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
89c60b1a05
Loosely couple Node.js code to canvas module.
...
Treat absence of canvas module like a web worker context.
Relates to #1103
2016-07-12 19:11:09 +02:00
Jürg Lehni
e15de78347
Update JSHint and fix some some hinting errors.
2016-07-09 14:32:01 +02:00
Jürg Lehni
643df2d46d
Add Raster#loaded to reflect the loading state of its image.
2016-06-14 17:08:32 +02:00
Jürg Lehni
6b3d8ecdfd
Add missing semi-colon.
2016-06-14 15:26:08 +02:00
Jürg Lehni
f6b77b7442
Do not change cashed decomposed matrix data when transforming content.
...
Just clear the cache and force new decomposition on next use, to avoid issues with nested applied transforms.
Closes #1004
2016-06-14 15:16:45 +02:00
sapics
a0b868c1ba
Fix indentations
2016-06-14 12:26:28 +09:00
Jürg Lehni
742401a0e1
Fix Item#insertChildren() error when passing null for some children.
...
Relates to #1036
2016-06-13 14:16:25 +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
f07927a95e
Correctly handle { x: 0, y: 0 } in Raster#getAverageColor()
...
Closes #1053
2016-05-27 11:42:08 +02:00
Jürg Lehni
fefb4302e8
Improve Item#_getStrokeMatrix()
2016-05-22 21:23:46 +02:00
Jürg Lehni
948a8af9a8
Fix Item#strokeBounds with #strokeScaling and #applyMatrix
...
Closes #1014
2016-05-22 21:17:24 +02:00
Jürg Lehni
d8d61ff160
Fix #1015 : Improve handling of already inserted children in#insertChildren()
2016-04-13 13:36:26 -07:00
Jürg Lehni
84421abbce
Set crossOrigin before src on image objects.
...
Reason: https://bugs.chromium.org/p/chromium/issues/detail?id=341047
2016-04-05 12:25:24 -07:00
Jürg Lehni
5a9f3dfb27
Improve handling of local paths and CORS on Node.js
2016-04-05 12:11:54 -07:00