Commit graph

122 commits

Author SHA1 Message Date
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
336bc1092e Replace Item#_boundsSelected with #_selectBounds
Plus some refactoring.
2016-03-17 13:09:02 +01:00
Jürg Lehni
fa6c1f47b4 Hit-Test: Pass viewMatrix as argument instead of in options object. 2016-02-14 13:34:35 +01:00
Jürg Lehni
55c5f42716 Part 1 of large refactoring of bounds handling. 2016-02-12 17:59:37 +01:00
Jürg Lehni
6797d2eb11 Respect clip-items in Group#_getBounds()
Closes #956
2016-02-11 12:51:04 +01:00
Jürg Lehni
0ae232e4ab Implement support for clip-masks in hit-testing.
Closes #671
2016-02-09 17:02:03 +01:00
sapics
ecc36ec3cc Remove unused variable in group._draw 2016-01-20 14:35:28 +09:00
Jürg Lehni
c5eaaff073 Remove ctx.currentPath caching optimization.
Unfortunately all browser have moved away from this again, in favour of Path2D.
2016-01-10 11:51:56 +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
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
sapics
9c1c00c11e Minor minification 2015-12-30 21:52:34 +01:00
Jürg Lehni
b541088c6f A whole lot of documentation clean-up. 2015-06-16 17:50:37 +02:00
Jürg Lehni
48cb05a181 Replace tabs with 4 white-spaces. 2014-08-16 19:24:54 +02:00
Jürg Lehni
9d7ec13724 Update prepro.js to version that can evaluate whole expressions, and fix a newly introduced issue with it. 2014-05-14 15:14:03 +02:00
Jürg Lehni
f002c633a7 Remove trailing white spaces and ensure newlines at the end. 2014-04-06 13:48:03 +02:00
Jürg Lehni
59da291d54 Remove tabs in examples in favor of 4 spaces.
To remove all these annoying JSHint complaints.
2014-04-02 21:03:35 +02:00
Jürg Lehni
f115072e8c Rename HIERARCHY change-flag to more precise CHILDREN. 2014-03-17 18:59:10 +01:00
Jürg Lehni
438de7013a Correctly handle groups as clipping masks.
Closes #370.
2014-03-17 14:51:47 +01:00
Jürg Lehni
a3114e5c28 Do not preserve matrix transformations in empty groups when applied to inexisting content. 2014-03-01 22:48:44 +01:00
Jürg Lehni
ea63d4c288 Merge branch 'refs/heads/master' into v8-optimizations
Conflicts:
	src/core/Base.js
	src/style/Color.js
2014-01-05 05:01:13 +01:00
Jürg Lehni
e22fa3a664 Update copyright notice. 2014-01-04 01:47:16 +01:00
Jürg Lehni
3dbad9c477 Replace delete in favor of setting to undefined to prevent V8 deoptimization. 2013-12-17 23:27:48 +01:00
Jürg Lehni
94d5a09b7b Do not inherit selection behavior from Group in Layer. 2013-12-09 15:10:09 +01:00
Jürg Lehni
97d94e8401 Allow Path#transformContent to be set to false too. 2013-11-26 23:12:55 +01:00
Jürg Lehni
c945bf7908 Docs: Various smaller clean ups. 2013-10-16 14:20:13 +02:00
Jürg Lehni
6b19f25f4b Fix typos in comments. 2013-08-08 15:21:35 -07:00
Jürg Lehni
aa4d990c90 Move and unify handling of Item#_set(props) to new Item#_initialize(), and add support for props.insert = false. 2013-07-21 15:45:22 -07:00
Jürg Lehni
a4535edbb9 Bring back _class names, since code minification breaks reliance on constructor.name.
Closes #248.
2013-06-23 20:18:32 -07:00
Jürg Lehni
177229f99f Define Group#transformContent as a boolean to control #applyMatrix() behavior.
And use it for SVG Import.
2013-06-18 15:57:30 -07:00
Jürg Lehni
f758fb306b Rename #_applyMatrix to #_transformContent.
And swap names with private function...
2013-06-18 15:50:11 -07:00
Jürg Lehni
f433423789 Respect _applyMatrix setting when calling #applyMatrix() in Group#_changed.
Required for Clip to work correctly.
2013-06-18 15:39:46 -07:00
Jürg Lehni
20f7c567aa Use Base objects for drawing params, so we can use param.extend() on them for easier overriding. 2013-06-11 20:40:44 -07:00
Jürg Lehni
fd3f698fe9 Apply "pending" matrix in group when it receives content. 2013-05-27 23:13:20 -07:00
Jürg Lehni
10d5de3ed6 Implement a better way to name and export class constructors.
This change also simplified the way classes are exported to PaperScope objects.
2013-05-27 12:48:58 -07:00
Jürg Lehni
c533dda7b5 Finally found a better and faster alternative for this.base() calls, by setting base on the function object instead.
base can be accessed on named functions very easily, leading to another measurable speed increase. Finally all performance reasons against straps.js are eliminated!
2013-05-27 10:04:05 -07:00
Jürg Lehni
369b329b23 Change straps.js to directly use initialize() as constructor function rather than redirecting calls to it.
Should yield some interesting performance improvements.
2013-05-27 09:11:50 -07:00
Jonathan Puckey
daf8d0f881 Rename 'properties' constructor parameter to 'object' in docs. 2013-04-21 13:54:31 +02:00
Jürg Lehni
9ee8590a4d Move Item.draw() to Item#draw().
Makes more sense this way.
2013-04-18 17:04:06 -07:00
Jürg Lehni
d23e21edd7 Make Item#draw() protected, so we know to not directly call it. 2013-04-18 16:58:35 -07:00
Jürg Lehni
0f19e72733 Minor tweaks. 2013-04-09 19:12:47 -07:00
Jürg Lehni
b55d89acda Move handling of clipping outside of draw function, so canvas context can correctly be saved and restored for clipping paths too. 2013-04-09 19:08:41 -07:00
Jürg Lehni
218732e320 Implement a row of simple optimizations to increase performance of Item constructors. 2013-04-07 17:36:09 -07:00
Jürg Lehni
f43b322d2a Rename Base#_type property to #_class. 2013-04-06 09:16:08 +02:00
Jonathan Puckey
b23a4ede56 Improve Group documentation. 2013-03-16 13:44:58 +01:00
Jürg Lehni
1d1e6425fa Remove all left-overs of call chaining, except for where it's in use. 2013-03-05 20:39:07 -08:00
Jürg Lehni
3f5d0a6925 Merge constructor._name with _type and use CamelCase for Item types. 2013-03-01 17:13:22 -08:00
Jürg Lehni
cef30f9dd1 Switch to #pathData for JSON serialization of Path and CompoundPath. 2013-02-28 19:41:13 -08:00
Jürg Lehni
119e5acbf9 Move #_setProperties() and #set() from Item to Base, rename it to #_set and use it for Tool too. 2013-02-15 18:28:49 -08:00
Jürg Lehni
d3ccec2256 Use the code from Group#isEmpty() and CompoundPath#isEmpty() for Item#isEmpty(), since any item that does not have children overrides it. 2013-02-15 18:01:23 -08:00
Jürg Lehni
6c9c16ad3d Update copyright information comments, and year. 2013-01-28 18:03:27 -08:00