Jürg Lehni
09d0f5f389
Correctly handle paths with only one segment in hit-testing code.
...
Closes #430 .
2014-04-04 12:08:20 +02:00
Jürg Lehni
c0d11ea98e
Fix hit-testing of PlacedSymbols.
...
Closes #428
2014-04-03 09:21:12 +02:00
Jürg Lehni
ee7c604ec0
Remove unused matrix parameter in PlacedSymbol#_hitTest()
2014-04-03 09:19:36 +02:00
Jürg Lehni
748256abb9
Fix broken documentation for Item.
2014-04-02 21:04:39 +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
fa9786b344
Switch to new simpler convention for control of beans creation in straps.js
2014-04-02 20:53:18 +02:00
Jürg Lehni
4d52867b4a
Fix spelling mistakes and white-spaces.
2014-04-02 20:52:13 +02:00
Jürg Lehni
0dca10d192
Take view#matrix into account when calculating and handling global matrices.
...
But make sure Item#globalMatrix returns a transformation without View#matrix factored in. Closes #440 .
2014-03-31 19:28:00 +02:00
Jürg Lehni
e0120b8f58
Fix spelling mistakes.
2014-03-31 18:13:54 +02:00
Jürg Lehni
92331a62c3
transformations will always be defined at this point of the code.
2014-03-31 18:13:36 +02:00
Jonathan Puckey
400bc69159
Remove unnecessary commas.
...
Found using jscritic.com.
2014-03-28 14:02:39 +01:00
Jonathan Puckey
01dbfe705c
Fix accidental leaking of variables to the global scope.
...
Found using jscritic.com
2014-03-28 13:46:51 +01:00
Jürg Lehni
7233c82084
Fix wrong call of _clearBoundsCache() on child.
...
Closes #426 .
2014-03-20 17:20:26 +01:00
Jürg Lehni
aeeba4d58d
Implement ChangeFlag.INSERTION notification to know when an item was inserted in a new parent inside the DOM.
2014-03-18 15:28:29 +01:00
Jürg Lehni
946e0d5b2c
Fix spelling mistakes.
2014-03-18 15:25:25 +01:00
Jürg Lehni
e998083156
Rename Shape#shape to Shape#type.
2014-03-18 12:47:54 +01:00
Jürg Lehni
09d90a21bc
Support legacy #type filtering again in #getItems(), and offer an alternative through instanceof checks with #class and #constructor property.
2014-03-18 12:39:55 +01:00
Jürg Lehni
62f7b0d73e
Simplify and merge Item#getItems() code with Project#getItems()
2014-03-18 11:47:50 +01:00
Jürg Lehni
833d71f7ea
Remove Item#type and replace it with Item#className, the non-hyphenated version of #type.
2014-03-18 11:42:38 +01:00
Jürg Lehni
f115072e8c
Rename HIERARCHY change-flag to more precise CHILDREN.
2014-03-17 18:59:10 +01:00
Jürg Lehni
0aa73d90c5
Change the way context dependent font sizes are handled by delegating handling to view.
...
Closes #425
2014-03-17 16:41:57 +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
0fe52a7d39
Implement an optimization in _changed() notifications where not all curves need to updated if only segments change that already have told their curves about the change.
2014-03-17 14:35:33 +01:00
Jürg Lehni
d594b4264d
Define settings.applyMatrix and inherit at Item creation time.
2014-03-04 09:30:04 +01:00
Jürg Lehni
7dbf6ceaff
Move Project#options to PaperScope#settings and define reasonable defaults.
2014-03-04 09:29:28 +01:00
Jürg Lehni
36e3cbddf2
Remove inheritance of Item#applyMatrix setting again.
...
Implementation cannot be solved well, since hierarchy is not known at creation time of item.
2014-03-02 21:00:08 +01:00
Jürg Lehni
80a725d08a
Rename Item#transformContent to the more correct Item#applyMatrix
2014-03-02 16:04:17 +01:00
Jürg Lehni
fb1420eee0
Internalize Item#applyMatrix() code in #transform() and add short-cut method to it in Matrix#apply()
2014-03-02 15:50:45 +01:00
Jürg Lehni
6fdb9f60bd
Merge branch 'refs/heads/master' into apply-matrix
2014-03-02 01:27:50 +01:00
Jürg Lehni
7bf9cc88e4
Merge pull request #387 from mgrabovsky/master
...
Fix typo in comment
2014-03-02 01:05:21 +01:00
Jürg Lehni
4ba17127aa
Make sure that #transformContent can only be set to true on items that actually support it.
2014-03-01 23:24:33 +01:00
Jürg Lehni
1a836a168f
Merge branch 'refs/heads/master' into apply-matrix
...
Conflicts:
src/item/Item.js
2014-03-01 22:55:54 +01:00
Jürg Lehni
a8578326ea
Inherit #transformContent setting from parent, if not explicitely defined.
2014-03-01 22:52:00 +01:00
Jürg Lehni
dad7821ee9
Include Item#transformContent in serialization and cloning.
2014-03-01 22:51:01 +01:00
Jürg Lehni
7cf4591a1e
Define Item#style before calling #addChild() in #initialize(), to avoid issues with layers.
2014-03-01 22:49:46 +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
c1ccdf6cb7
Take into account the view's resolution in Item#rasterize()
2014-02-26 16:20:19 +01:00
Jürg Lehni
ec0877962b
Expose the view's pixel-ratio and resolution through View#pixelRatio and View#resolution
2014-02-26 16:19:48 +01:00
Jürg Lehni
ccfd51a65a
Improve performance of Path constructors and handling of { insert: false } Item creation.
2014-02-26 16:15:51 +01:00
Jürg Lehni
737466d15c
Fix all faulty {@true} doc statements.
2014-02-26 15:39:00 +01:00
Jürg Lehni
bf50bd649a
Fix issue in Item#rasterize() when resolution is not 72 DPI.
...
Closes #412 .
2014-02-26 11:54:14 +01:00
Jürg Lehni
86e4d2a6b9
Implement Curve#remove() and Path#reduce().
...
Also have Item#reduce() recursively call #reduce() on reduced children.
2014-02-20 02:50:39 +01:00
Jürg Lehni
74a153dd88
Some code clean-up.
...
More to come.
2014-02-17 20:59:38 +01:00
Jürg Lehni
568bb06853
Add comments about missing #importSVG() documentation.
2014-02-12 09:39:34 +01:00
Matěj Grabovský
890eda9197
Fix typo in comment
2014-01-15 18:04:51 +01:00
Jürg Lehni
5a131930fb
Add _dontNotify parameter to Matrix#reset() and use it in Item#applyMatrix()
2014-01-06 00:18:40 +01:00
Jürg Lehni
6ad2105110
Replace delete in favor of setting to undefined to prevent V8 deoptimization.
2014-01-05 19:16:48 +01:00
Jürg Lehni
706fe2c77d
Rearrange Base.read argument sequence.
...
options are used more often than length.
2014-01-05 18:31:24 +01:00
Jürg Lehni
b66c41e1c9
Remove need for arguments[1] in Item#transform()
2014-01-05 18:05:47 +01:00
Jürg Lehni
8d08d3c014
Remove the need for arguments[0] in bounds getters.
2014-01-05 18:01:38 +01:00
Jürg Lehni
e3f3a9c9d2
Merge branch 'refs/heads/master' into v8-optimizations
2014-01-05 17:42:59 +01:00
Jürg Lehni
1ee5b2c126
Fix references to Bootstrap.js in comments.
2014-01-05 17:41:38 +01:00
Jürg Lehni
6cb25fafe3
Use changes in latest Straps.js to remove as many hidden parameters as possible.
...
Hidden parameters through arguments[] are bad news for JS optimizer engines.
2014-01-05 17:40:54 +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
ad34bbf7aa
Bail out of Item#transform() immediately if there is nothing to do.
2014-01-02 21:47:00 +01:00
Jürg Lehni
c197f531a4
Implement options.asString for Item#exportJSON()
2013-12-30 23:34:19 +01:00
Jürg Lehni
81651a7379
Prevent V8 "assignment to parameter in arguments object" deoptimizations.
...
Some getter-like functions still need fixing, but this might require a fix in Straps.js first.
2013-12-17 23:28:55 +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
e2b06b8e54
Filter out insert property in Item#set()
2013-12-16 22:03:33 +01:00
Jürg Lehni
a51f8d4ee8
Rename Item#anchor -> Item#pivot
2013-12-13 20:50:58 +01:00
Jürg Lehni
25d8b1f0d2
Clean up code and comments in various places.
2013-12-11 17:10:09 +01:00
Jürg Lehni
3ff4a6d801
Use Point.read() for center parameter in Item#rotate
2013-12-11 17:09:03 +01:00
Jürg Lehni
da427e969b
Make hit-tests work again with projects that don't have a view.
...
Fixes broken tests.
2013-12-11 17:08:36 +01:00
Jürg Lehni
97f7204eab
Write documentation for Item#anchor.
2013-12-11 16:23:30 +01:00
Jürg Lehni
42788a5bf7
Keep support for Item#registration for now as well, since there are some scripts on the mailing list that use it.
2013-12-11 15:08:56 +01:00
Jürg Lehni
78a2685324
Rename Item#registration to Item#anchor
2013-12-11 14:59:51 +01:00
Jürg Lehni
e2b48ebf33
Allow layers to select children again, since it breaks examples otherwise.
2013-12-10 23:55:41 +01:00
Jürg Lehni
9501fd1924
Make hit-test tolerance dependent of view#matrix
2013-12-10 22:53:03 +01:00
Jürg Lehni
9177bac125
Use same stroke tolerance approach for hit-testing joins and caps as well.
2013-12-10 14:23:05 +01:00
Jürg Lehni
7c28c7e9e3
Do not factor in view matrix into Item#globalMatrix.
...
Instead concatenate it when drawing selections.
2013-12-10 13:18:21 +01:00
Jürg Lehni
48c8946f9e
Implement correct hit-testing tolerance using transformed 2D stroke padding rather than unscaled numerical tolerance.
...
But we still need to factor in the View zoom as well...
2013-12-10 12:52:42 +01:00
Jürg Lehni
3d868ae400
Fix issue with cached internal bounds and #transformContent == true.
2013-12-10 12:51:49 +01:00
Jürg Lehni
48b7b740ad
Allow the creation of internally used items with no ids.
2013-12-10 11:07:14 +01:00
Jürg Lehni
642111a7a2
Fix error in #getGlobalMatrix()
2013-12-09 19:33:50 +01:00
Jürg Lehni
b7943239eb
Implement cached getInternalRoughBounds as well.
2013-12-09 19:33:34 +01:00
Jürg Lehni
7278ee4374
Make JSON serialization work for Shapes.
2013-12-09 17:27:41 +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
e238d23194
Implement caching of internal, untransformed bounds.
2013-12-09 10:53:19 +01:00
Jürg Lehni
81fe98d1bb
Make cachedBounds mechanism work for Symbols.
2013-12-09 09:05:29 +01:00
Jürg Lehni
f8f60ec603
Fix slow-down in bounds caching.
2013-12-09 08:58:37 +01:00
Jürg Lehni
2cd3de8188
Improve versioning of _globalMatrix
2013-12-09 07:51:28 +01:00
Jürg Lehni
064d632d65
More matrix related clean-ups.
2013-12-08 22:12:36 +01:00
Jürg Lehni
238f577e6f
Clean up _getCachedBounds() code.
2013-12-08 22:06:32 +01:00
Jürg Lehni
516b9d040f
Apply matrices before calculating boolean path operations.
2013-12-08 21:39:56 +01:00
Jürg Lehni
24ce35cc6e
Make sure items removed from DOM remove all their events and reinstall them again when reinserted.
...
Closes #254 .
2013-12-08 20:40:30 +01:00
Jürg Lehni
97fcd6ff38
Implement Item#getGlobalMatrix(), #globalToLocal() and #localToGlobal()
...
Closes #270 .
2013-12-08 20:04:10 +01:00
Jürg Lehni
6e5d8939d5
Rename View#draw() -> View#update() and remove checkRedraw argument.
...
We always check for changes, since change propagation should work reliably.
2013-12-08 19:15:58 +01:00
Jürg Lehni
c75d48cf98
Fix comments.
2013-12-08 18:45:11 +01:00
Jürg Lehni
afe00add32
Implement option.type filtering in #hitTest() functions.
2013-12-08 16:32:42 +01:00
Jürg Lehni
61f2f5c978
Put constructors into separate ctor variables when handling dontLink parameters before creating objects.
...
This hopefully solves the mysterious issue #360 on Chrome.
2013-12-07 20:03:23 +01:00
Jürg Lehni
acc0e80d78
Implement registration point for all items.
...
Allowing any item to use another point than the center as its anchor point for item.position.
2013-12-07 19:46:12 +01:00
Jürg Lehni
2401b38b03
Fix issue with group.position not updating when content changes.
2013-12-07 19:17:59 +01:00
Jürg Lehni
758c9b6146
Improve caching of decomposed transformation values.
2013-12-07 12:47:16 +01:00
Jürg Lehni
9ca92165ee
Expose rotation and scaling transformations through Item#rotation and Item#scaling properties, by moving the setters from Matrix to Item.
2013-12-07 12:16:11 +01:00
Jürg Lehni
3d94ff6968
Only decompose matrix if there are bounds to be reused.
2013-12-07 05:50:08 +01:00
Jürg Lehni
1ba77f9d40
Implement Item#skew() and clean up Item transformation functions documentation.
2013-12-07 05:21:27 +01:00
Jürg Lehni
2d307f0e7c
Only preserve bounds if there is no shearing in the transformation.
...
Closes #358 .
2013-12-07 05:19:49 +01:00
Jürg Lehni
7e9989c6b9
Improve comment about globalMatrix.isInvertible() check.
2013-12-06 13:41:57 +01:00
Jürg Lehni
92590b160c
Implement Canvas Path caching again using Context#currentPath.
2013-12-06 12:49:46 +01:00
Jürg Lehni
550749d057
Avoid issues with _matrix being undefined when items are created and added in a certain sequence.
...
Closes #279 .
2013-12-03 23:14:34 +01:00
Jürg Lehni
fc02c58ddb
Implement asynchronously loading Rasters from disk and remote locations for Node.js
...
Closes #328 .
2013-12-03 23:07:54 +01:00
Jürg Lehni
dcad9d44ed
Copy over parent style in Item#reduce().
...
Only really needed for CompoundPath...
2013-11-30 14:02:54 +01:00
Jürg Lehni
93d10983ee
Update to latest Prepro.js and switch from global options object to __options, to avoid name clashes.
2013-11-29 20:26:38 +01:00
Jürg Lehni
1149399690
Add missing DOCS comments.
2013-11-29 18:50:04 +01:00
Jürg Lehni
7e65426158
Implement Item#data cloning.
...
Closes #340 .
2013-11-28 22:27:14 +01:00
Jürg Lehni
593e0d8d7f
Remove Base.merge() and use a new Straps.js feature instead.
...
A more clever Base() constructor that allows merging.
2013-11-28 22:20:00 +01:00
Jürg Lehni
c0e8285c07
Fix setting #radius on Shape.Circle.
2013-11-28 18:03:41 +01:00
Jürg Lehni
18db7c0d56
Fix issue with items with frame events never being removed from _frameItems list.
2013-11-27 12:38:56 +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
b96f9ff57b
Rearrange method sequence in Item.
2013-11-26 19:27:09 +01:00
Jürg Lehni
56f25e8742
Implement change propagation in matrices.
2013-11-26 19:03:58 +01:00
Jürg Lehni
da9e1f8de7
Define Project#isEmpty()
2013-11-24 22:53:41 +01:00
Jürg Lehni
af4410953f
Various clean-ups regarding the handling of activeLayer, JSON deserialization, DOM insertion and and layer reusing.
...
JSON deserialization does no longer insert items into DOM twice now, and should therefore be faster.
2013-11-24 16:25:13 +01:00
Jürg Lehni
5439f6ba45
We need to take pixel ratio into account when directly blitting blend-modes onto canvas.
2013-11-06 13:11:54 +01:00
Jürg Lehni
d6be004ee6
Setting a matrix on an item with #transformContent = true should immediately apply it.
2013-11-04 11:43:17 +01:00
Jürg Lehni
b8ab0f36f9
Remove unused local variable and comment.
2013-11-02 20:37:23 +01:00
Jürg Lehni
132f54d362
Define Item#clear() as an alias for Item#removeChildren(), or Path#removeSegments() for paths.
2013-11-01 17:52:27 +01:00
Jürg Lehni
c76dae5b06
Implement a new strategy for importing JSON, where it is imported into the item itself, not its children list, if the class match.
2013-11-01 11:26:11 +01:00
Jürg Lehni
2a9fe48cc9
Add options.matchShapes support to #exportSVG and improve documentation of various import / export functions.
2013-10-30 16:18:59 +01:00
Jürg Lehni
5d7c7a2409
Improve documentation of #hitTest()
2013-10-30 16:18:15 +01:00
Jürg Lehni
2a88042315
Handle importing of SVG gradients for shapes, and drawing of canvas gradients correctly.
...
Closes #312 .
2013-10-30 01:25:13 +01:00
Jürg Lehni
eecf68b7c3
Clear ctx.shadowColor after ctx.fill() to avoid application to both fill and stroke.
...
Closes #314 .
2013-10-30 00:00:04 +01:00
Jürg Lehni
1871e2f7c4
Improve comments.
2013-10-29 21:18:09 +01:00
Jürg Lehni
fd96447ac1
Share ellipse reading code between Shape.Ellipse and Path.Ellipse.
2013-10-29 21:15:28 +01:00
Jürg Lehni
aca9968164
Simplify Shape#_contains() code.
2013-10-29 21:09:11 +01:00
Jürg Lehni
4333334014
Simplify Shape#hitTest() code.
2013-10-29 21:06:58 +01:00
Jürg Lehni
6fba727600
Add DOCS comments.
2013-10-29 21:00:24 +01:00
Jürg Lehni
f8d960d834
option.tolerance should always be defined in _hitTest()
2013-10-29 21:00:17 +01:00
Jürg Lehni
ae4ddaeae5
Implement correct hit-tests for rounded rectangle Shape items.
2013-10-29 20:58:30 +01:00
Jürg Lehni
c43752dc3e
Use #hasFill() and #hasStroke() more broadly and avoid drawing strokes when strokeWidth is set to 0.
2013-10-29 20:05:39 +01:00
Jürg Lehni
94623f6d3f
Keep radius and size in sync in Path.Rectangle.
2013-10-29 19:42:33 +01:00
Jürg Lehni
b86b66d43d
Improve documentation.
2013-10-29 19:25:10 +01:00
Jürg Lehni
7f8d9d9e90
Support options.tolerance in Shape#hitTest()
2013-10-29 19:17:42 +01:00
Jürg Lehni
9d60662a28
Check for the occurrence of 'radius' rather than 'center' when deciding to read a center / radius pair for ellipses.
2013-10-29 18:53:55 +01:00
Jürg Lehni
c3aed5277d
Use center and radius in all ellipse code, rather than bounding rect.
...
Simplifies things.
2013-10-29 18:10:30 +01:00
Jürg Lehni
04286bc1e0
Fix issue with param.trackTransforms
...
We can only pop() if we push()
2013-10-29 17:56:43 +01:00
Jürg Lehni
b2188be567
Make sure _globalMatrix is not set to false values in Item#rasterize().
2013-10-29 17:37:45 +01:00
Jürg Lehni
d649b1bb21
Define insert argument for Path#toShape() and Shape#toPath()
2013-10-29 16:45:50 +01:00
Jürg Lehni
5a462f42b7
Improve some comments / docs.
2013-10-29 09:42:59 +01:00
Jürg Lehni
c579433b3d
Fix bug in Raster.onLoad()
...
It was executing in wrong scope on websites with multiple scopes.
2013-10-29 09:42:58 +01:00
Jürg Lehni
160fe25cd1
Improve documentation of #importSVG() methods.
2013-10-29 09:42:58 +01:00
Jürg Lehni
b4651a18c6
Implement #getItem() on Project and Item, similar to #getItems() but returning only the first match.
2013-10-19 13:02:53 +02:00
Jürg Lehni
1a645a1adb
Implement function callbacks for item matching.
2013-10-19 12:38:36 +02:00
Jürg Lehni
4fb6a5d949
Implement #getItems(match) on Project and Item as a simple and efficient query interface.
2013-10-19 12:27:13 +02:00
Jürg Lehni
0b7e128426
Only rely on _drawCount for drawing related things, and caching where it allows.
...
Project#selectedItems was out of sync until the next draw loop.
2013-10-18 21:52:22 +02:00
Jürg Lehni
1fc9f882ca
Fix a minor bug in CompoundPath#contains(), improve comments and clean up code.
2013-10-18 19:49:05 +02:00
Jürg Lehni
5d0fd8f970
Implement Style#windingRule and use it in Path#contains().
2013-10-18 14:54:13 +02:00
Jürg Lehni
73d2c34088
Implement item-level #equals() method and clean up other equals methods.
2013-10-17 13:08:54 +02:00
Jürg Lehni
9976033655
Implement serialization of selection.
2013-10-17 12:04:11 +02:00
Jürg Lehni
c2a34d9f1f
Implement an easier approach in serialization to handle the default value of leading.
2013-10-17 11:53:34 +02:00
Jürg Lehni
1eb6b49e8a
Allow serialization values to mark themselves as _default.
...
Solves unnecessarily serialized leading values.
2013-10-17 11:47:46 +02:00
Jürg Lehni
9956a6ff51
Implement Shape#toPath(), analogue to Path#toShape().
...
This way is much simpler though.
2013-10-16 23:44:50 +02:00
Jürg Lehni
c4c7a37993
Implement Path#toShape(), Segment#isColinear(), Segment#isOrthogonal() and Segment#isArc().
2013-10-16 23:10:03 +02:00
Jürg Lehni
be5a73a61d
SVG: Implement support for Shape.
2013-10-16 16:47:00 +02:00
Jürg Lehni
8ab6c61b0d
Rename Shape#type to Shape#shape, to avoid clash with Item#type.
2013-10-16 16:46:22 +02:00
Jürg Lehni
b581c84d8b
Move CompoundPath#reduce() to Item#reduce().
2013-10-16 16:10:28 +02:00
Jürg Lehni
9eb1c104da
Implement Shape#clone()
2013-10-16 15:04:50 +02:00
Jürg Lehni
b35296ef3e
Improve Shape.Ellipse to support center & radius parameters, and update documentation.
2013-10-16 15:04:37 +02:00
Jürg Lehni
c945bf7908
Docs: Various smaller clean ups.
2013-10-16 14:20:13 +02:00
Jürg Lehni
2263afea59
Start implementing rounded rectangles in Shape.Rectangle.
2013-10-14 19:57:28 +02:00
Jürg Lehni
a3d0e0d462
Clean up throw statements.
...
Never throw plain strings.
2013-10-14 16:05:50 +02:00
Jürg Lehni
b9ba2364fe
Move Shape#isEmpty() to right place.
2013-10-14 09:15:34 +02:00
Jürg Lehni
198305b75c
Remove doc comment since Item#isEmpty() is already documented, and move it to an inline comment.
2013-10-14 09:14:59 +02:00
Oliver Jones
df7f1fe874
Override default isEmpty method for Shape
...
Fixes (new Group([new Shape.Rectangle(...)])).bounds throwing ReferenceError when using Item's isEmpty
2013-10-12 19:28:45 +01:00
Jürg Lehni
c68a7d33da
Switch from options.browser and options.node to options.environment
2013-10-10 23:09:00 +02:00
Jürg Lehni
24e46bee60
Merge branch 'refs/heads/boolean-fix'
2013-10-08 20:50:47 +02:00
Jürg Lehni
367aa8ea28
Do not allow numeric values for Item#name.
...
Closes #298 .
2013-10-08 20:38:16 +02:00
Jürg Lehni
921a68e4a2
Rename _removeFromNamed to _removeNamed.
2013-10-08 20:25:26 +02:00
Jürg Lehni
5f8c00fe8d
Start implementing Item#globalToLocal() and #localToGlobal()
2013-09-22 18:04:27 -07:00
Jürg Lehni
19c7788617
Fix documentation irregularities.
2013-08-23 19:45:28 -07:00
Jürg Lehni
40f2547e5f
Correctly detect image size on all browsers.
...
Closes #268 .
2013-08-15 11:32:47 -07:00
Jürg Lehni
590c89840c
Merge Raster#setImage() and #setCanvas().
2013-08-14 12:29:56 -07:00
Jürg Lehni
cc565b3fe2
Rename Raster#getSubImage() to #getSubCanvas(), and use insert: false combined with #insertAbove() to correctly insert newly created rasters.
2013-08-14 12:21:47 -07:00
Jürg Lehni
5981ddf89f
Implement Raster#getSubRaster() and document both #getSubImage() and #getSubRaster().
2013-08-14 12:14:28 -07:00
Jürg Lehni
1a1c2674fd
Take Item#matrix into account when drawing gradients.
...
Closes #267 .
2013-08-14 11:27:04 -07:00
Jürg Lehni
46f6261d38
Merge pull request #265 from duckmaestro/master
...
Fix to #263 : _children undefined inside call to myShape.isEmpty().
2013-08-08 17:24:10 -07:00
Jürg Lehni
6b19f25f4b
Fix typos in comments.
2013-08-08 15:21:35 -07:00
Clifford Champion
2d3200c8d7
Fix to #263 : _children undefined inside call to myShape.isEmpty().
2013-07-27 23:47:49 -07:00
Jürg Lehni
5e8ec2066b
Clean up comment.
2013-07-21 16:52:18 -07:00
Jürg Lehni
16735e23af
Simplify code for #insertAbove/Below(), by introducing a private helper.
...
Making overriding in Layer simpler.
2013-07-21 16:41:45 -07:00
Jürg Lehni
5e210c583a
Switch to returning items instead of booleans in #insertAbove/Below() and adjust documentation accordingly.
2013-07-21 16:29:13 -07:00
Jürg Lehni
edfb3a51ab
Improve documentation of insertion methods.
2013-07-21 16:26:16 -07:00
Jürg Lehni
e68563af53
Have #insertAbove/Below() return a boolean.
2013-07-21 16:26:03 -07:00
Jürg Lehni
e0809d26f2
Merge code for Item#insertAbove() / #insertBelow() and fix issue with wrong indices.
...
The previous code was faulty when item was not already in the children list.
2013-07-21 16:22:16 -07:00
Jürg Lehni
949752556b
Fix avoiding of name clashes in cloning.
2013-07-21 15:54:03 -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
5e2654b490
Allow Item#_changed() to function before #_project is set.
2013-07-21 15:44:18 -07:00
Jürg Lehni
b7aea1e527
Use insert: false option in creation of all clones.
...
Still needs implementing in Item constructor.
2013-07-19 18:42:13 -07:00
Jürg Lehni
20a17f2939
Implement insert parameter in Item#clone() to control DOM insertion.
...
Defaults to true. Also insert in the right place now, above the original.
2013-07-19 18:27:00 -07:00
Jürg Lehni
588abe7189
Only test for fill in Item#_hitTest() if options.fill is set.
2013-07-19 17:55:31 -07:00
Jürg Lehni
f466473bfb
Add support for shadows.
...
Closes #36 .
2013-07-19 17:48:29 -07:00
Jürg Lehni
94c192495a
Add support for canvas compositing modes to Item#blendMode.
...
Closes #159 .
2013-07-19 15:23:16 -07:00
Jürg Lehni
175091a69f
Allow combinations of blendMode and opacity.
...
Closes #259 .
2013-07-19 11:46:13 -07:00
Jürg Lehni
47768779b7
Fix blurriness in Item#rasterize().
...
Closes #258 .
2013-07-18 20:06:22 -07:00
Jürg Lehni
affb44e0dd
Prevent double execution of onLoad event on Raster.
2013-07-03 19:02:29 -07:00
Jürg Lehni
e87307af41
Fix issue with Image.onLoad() events.
...
naturalWidth/Height seems unreliable.
2013-07-03 18:49:05 -07:00
Jürg Lehni
fdfb7abe58
Update exportSVG() documentation.
2013-06-27 18:14:51 -07:00
Jürg Lehni
09f04a597f
Write documentation for Shape constructors.
2013-06-27 18:04:02 -07:00
Jürg Lehni
41746d2d25
Docs: Write documentation for #import/export JSON/SVG, for both Item and Project.
2013-06-27 18:03:49 -07:00
Jürg Lehni
0c9914285f
Return Raster#size as a LinkedSize.
2013-06-27 16:06:11 -07:00
Jürg Lehni
9311b38894
Define Shape#size and #radius.
2013-06-27 16:05:44 -07:00
Jürg Lehni
3d5ae373a8
Remove static create() methods from LinkedPoint/Size/Rectangle, and give them initialize() methods instead that also name the classes in debugging.
2013-06-25 09:41:55 -07:00
Jürg Lehni
1866e4ff15
Remove need for all special arguments in minification, and restructure code to avoid warnings.
2013-06-24 10:15:54 -07:00
Jürg Lehni
f56794bad4
Remove global variable leakage.
2013-06-24 04:52:13 -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
dff39dff78
Use local bounds for hit-testing.
...
Fixes issue #247 .
2013-06-23 19:49:36 -07:00
Jürg Lehni
9f7167a47f
Clean up Item#hitTest() code.
2013-06-23 19:01:48 -07:00
Jürg Lehni
58f697abfc
Fix hit-testing for guides.
2013-06-23 19:01:36 -07:00
Jürg Lehni
76426c4cb3
Take #visible state into account when hit-testing.
...
Closes #243 .
2013-06-23 17:55:14 -07:00
Jürg Lehni
719b9d5e24
Move logic that determines if item can be directly composited into separate per-item #_canComposite() method.
2013-06-19 08:22:08 -07:00
Jürg Lehni
3d78e3729d
Fix issue with PaperScript and array[i++] expressions.
2013-06-18 18:18:39 -07:00
Jürg Lehni
b532390d9c
Remove Clip class again.
...
Group can handle that.
2013-06-18 15:58:58 -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
d7d6da0af8
Pass right value for dontNotify.
2013-06-18 15:47:14 -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
75acdf1025
Add support for direct drawing of native blendModes for items that allow it.
...
Bypassing compositing into separate canvases completely.
2013-06-18 14:18:57 -07:00
Jürg Lehni
ad6124cf98
Take strokeWidth into account in Item#hasStroke()
2013-06-18 14:08:48 -07:00
Jürg Lehni
f4f97cda88
Fix a bug with wrong offsets when rendering nested clips and blend-modes.
...
And streamline blend-mode and opacity rendering code.
2013-06-18 12:35:57 -07:00
Jürg Lehni
414ac1d092
Fix offset in direct blitting of nested Clip items.
2013-06-18 12:20:21 -07:00
Jürg Lehni
f350f34eb4
Apply clipping fix not only to blend modes but any operation that draws into a separate canvas.
2013-06-17 16:22:23 -07:00
Jürg Lehni
ab2bfe2d40
Rename nativeDash to dash.
2013-06-17 15:52:16 -07:00
Jürg Lehni
d6db007765
Fix documentation warning.
2013-06-13 15:57:12 -07:00
Jürg Lehni
ae474131cc
Implement stroke hittesting for Shape.Rectangle.
2013-06-13 10:40:54 -07:00
Jürg Lehni
48fa889e0d
Start implementing proper hit-testing for Shapes with strokes.
...
Support for Shape.Rectangle is still missing.
2013-06-13 10:31:21 -07:00
Jürg Lehni
40dbe7ec74
Fix drawing of Shape.Ellipse items.
2013-06-13 10:30:54 -07:00
Jürg Lehni
7f6ac3d8af
Changing HIERARCHY also changes GEOMETRY.
...
Fixes #237 .
2013-06-13 08:47:45 -07:00
Jürg Lehni
5250281ab1
Fully support object literal arguments in Shape constructors.
2013-06-12 20:13:39 -07:00
Jürg Lehni
95ecab8a6f
Improve handling of merged CompoundPath style through #getStyle().
...
Only access _style directly in core code if you really know what you're doing!
2013-06-12 20:12:08 -07:00
Jürg Lehni
33eb750586
Simplify Path#hasFill() and implement #hasStroke() as well.
2013-06-12 19:57:05 -07:00
Jürg Lehni
fe10c99d1b
Implement standard behavior of #_hitTest() for items without children, based on #_contains().
...
This should cover the minimum of what's needed for PointText.
2013-06-12 19:30:23 -07:00
Jürg Lehni
34ad9045cc
Fix wrong default fillColor on TextItems.
2013-06-12 17:30:35 -07:00
Jürg Lehni
b581f8b33e
Implement Style#selectedColor and Item#selectedColor as a way to control appearance of selections.
...
Closes #219 .
2013-06-12 14:17:34 -07:00
Jürg Lehni
8c596927fb
Store _removeSets per project, not globally.
2013-06-12 13:50:05 -07:00
Jürg Lehni
94e07e77f0
Redraw clipItem when drawing into separate canvas for blend-modes.
...
Closes #228 .
2013-06-11 20:41:20 -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
d76d573eb2
Reset transformation matrix when blitting off-screen canvas.
...
Closes #233 .
2013-05-29 13:52:47 -07:00
Jürg Lehni
0e2ae48b02
Fix regressions in Raster caused by faulty merge.
2013-05-28 13:54:47 -07:00
Jürg Lehni
73351cbda7
Store data in _data rather than on the image itself.
2013-05-28 08:10:51 -07:00
Jürg Lehni
c75a98c406
Clean up @trankek's fix for node a bit.
...
Fix prepro.js conditionals.
2013-05-28 08:05:40 -07:00
Jürg Lehni
e0856a0d31
Merge branch 'master' of https://github.com/tranek/paper.js into tranek-master
...
Conflicts:
src/item/Raster.js
2013-05-28 08:00:01 -07:00
Jürg Lehni
6fa6c022c9
Rename options.server to options.node
2013-05-28 00:01:55 -07:00
Jürg Lehni
cd7db56249
Remove all create() constructors for basic types since new constructors are now faster.
...
Woop!
2013-05-27 23:57:31 -07:00
Jürg Lehni
4e6f52c20c
Remove need for _needsRedraw() calls by replacing it with a boolean flag.
2013-05-27 23:40:23 -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
9b0d32651f
Move main Item insertion code from #insertChild() to #insertChildren().
...
Handles insertion and change notification much more efficiently.
2013-05-27 20:06:30 -07:00
Jürg Lehni
73388d6f9c
Fix documentation warning.
2013-05-27 18:30:57 -07:00
Jürg Lehni
e516e6f651
Only reset matrices in Groups when it could actually be applied to the content.
...
That way, empty groups in SVGImport still keep their transformation state.
2013-05-27 15:42:16 -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
Jürg Lehni
094e35f2e5
No need for separate injection object for Item.extend()
2013-05-27 08:16:34 -07:00
Jürg Lehni
7f00ef8f05
Fix white-spaces.
2013-05-24 22:25:22 -07:00
tranek
1637127e09
Fixed data URLs src disappearing
2013-05-24 20:55:59 -04:00
tranek
cd7938e363
Fixed string equals in Raster data URL for Node.js
2013-05-24 16:41:02 -04:00
tranek
269b93e888
Added data URLs for Rasters in Node.js
2013-05-24 16:38:43 -04:00
Jürg Lehni
ae416f821c
Explain the booolean argument in color getter calls, and put _matrix in local variable for better minification.
2013-05-13 19:31:41 -07:00
Jürg Lehni
7c2e57e105
Remove Item#applyMatrix boolean, go back to previous way of directly applying transformations to children in Group and Layer, and introduce new Clip class for non-transformed nested matrices.
2013-05-13 18:57:17 -07:00
Jürg Lehni
f34fe102a4
Use new alias notation for deprecated functions, wherever we can.
2013-05-06 21:01:04 -07:00
Jürg Lehni
b59a98f7ce
Add jQuery style aliases to Callback and use #on() in the examples rather than #attach().
2013-05-06 20:56:58 -07:00
Jürg Lehni
883e3ad563
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
2013-04-30 18:41:26 -07:00
Jürg Lehni
420fb49230
Speed up Raster#getPixel().
2013-04-24 18:09:58 -07:00
Jürg Lehni
ead3646581
Handle alpha channels correctly in Raster#get/setPixel.
...
Closes #209 .
2013-04-24 16:29:28 -07:00
Jürg Lehni
96d9b6730f
Rename Svg acronyms in API to SVG.
2013-04-23 07:19:08 -07:00
Jürg Lehni
cebeb11301
Rename Json acronyms in API to JSON.
2013-04-23 07:13:51 -07:00
Jürg Lehni
faecb7e78a
Allow creation of items when project has no layers.
2013-04-22 23:25:34 -07:00
Jürg Lehni
1b61e4333c
Implement Project#clear().
2013-04-22 22:48:36 -07:00
Jürg Lehni
885d75296d
Fix Layer#isInserted() for nested Layers.
2013-04-22 22:47:48 -07:00
Jürg Lehni
6800a6d534
Use separate id ranges for different classes.
2013-04-22 19:09:59 -07:00
Jürg Lehni
2a53dbe60f
Restructure Color constructor to remove need for Color.create().
2013-04-22 19:07:38 -07:00
Jürg Lehni
2fc4ff10ee
Implement Item#_contains() with local coordinates, and have Item#contains() take Item#matrix into account.
2013-04-21 08:43:05 -07:00
Jonathan Puckey
a5997dcc24
Add example to Item#contains(point) docs.
2013-04-21 13:56:29 +02:00
Jonathan Puckey
daf8d0f881
Rename 'properties' constructor parameter to 'object' in docs.
2013-04-21 13:54:31 +02:00
Jonathan Puckey
0369f5aea9
Fix mistake in example code.
2013-04-21 13:53:13 +02:00
Jürg Lehni
4b24690207
Implement Shape#contains() and define unit tests for it.
2013-04-20 20:54:06 -07:00
Jürg Lehni
2793709935
Fix wrong Shape.Circle size.
2013-04-20 20:53:40 -07:00
Jürg Lehni
db7eb65bd7
Implement Item#contains() and use it for hit-testing Rasters.
2013-04-20 20:41:52 -07:00
Jürg Lehni
bb03c72ce8
Implement Item#hasFill().
2013-04-20 20:40:20 -07:00
Jürg Lehni
acd3236989
Optimize Shape constructors by passing along point.
2013-04-20 20:24:16 -07:00
Jürg Lehni
3025c63179
Simplify Style creation.
2013-04-19 20:00:30 -07:00
Jürg Lehni
e1807214f4
Large refactoring of Style handling for notable speed improvements.
2013-04-19 19:31:29 -07:00
Jürg Lehni
98f7c020bd
Use Item#type instead of instanceof checks for better performance.
2013-04-19 19:27:02 -07:00
Jürg Lehni
bf9acd4499
Correct Numerical.KAPPA value.
2013-04-19 18:57:31 -07:00
Jürg Lehni
9da392a99c
Commit initial support for Shape class.
...
Hit testing is still missing.
2013-04-19 17:25:50 -07:00
Jürg Lehni
9cc0822477
Move PlacedItem#_hitTest() to PlacedSymbol#_hitTest() since it was written for symbols, and remove PlacedItem as it's an empty class now.
2013-04-19 16:40:30 -07:00
Jürg Lehni
8d99aa5f95
Handle color transformation in Item#transform() rather than Path#_applyMatrix().
...
Fixes an issue with BoucingBalls.html, now that CompoundPath#applyMatrix is true.
2013-04-19 13:13:54 -07:00
Jürg Lehni
922b9b5bd0
Rename _cloning parameter to _preserve.
2013-04-19 11:54:16 -07:00
Jürg Lehni
517b2ee27f
Inline Item.drawSelectedBounds() code.
2013-04-18 17:07:32 -07: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
d1c6b7134f
Fix Raster#getAverageColor() to work with new transforms history code.
2013-04-18 16:50:18 -07:00
Jürg Lehni
c50b940ff3
Fix Item#rasterize() to work with new matrices history code.
2013-04-18 16:23:27 -07:00
Jürg Lehni
d2b43b043a
Fix comment.
2013-04-16 19:41:45 -07:00
Jürg Lehni
2c3e8a32ab
Handle nested matrices correctly when drawing blend modes or transparency.
...
Closes #194 .
2013-04-09 20:01:10 -07:00
Jürg Lehni
f79e561512
Handle bounds correctly for groups with only empty children.
2013-04-09 19:24:41 -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
90cc10cc4b
Calculate _globalMatrix for all drawn items and use it for the drawing of selections.
2013-04-09 18:52:47 -07:00
Jürg Lehni
8da8f116d1
Restructure style related class organization.
2013-04-09 17:08:09 -07:00
Jürg Lehni
b3b0fa649b
Minor Style refactoring clean-ups.
2013-04-09 16:51:57 -07:00
Jürg Lehni
b4a99415d0
Merge PathStyle, CharacterStyle and ParagraphStyle into Style.
...
Closes #130 .
2013-04-09 16:46:20 -07:00
Jürg Lehni
d3bb68d0e0
Use faster Array construction.
2013-04-09 07:55:09 -07:00
Jürg Lehni
01673d675d
Fix issues with new Color serialization.
2013-04-08 13:10:49 -07:00
Jürg Lehni
a48e6e5bf9
More work on Color refactoring.
2013-04-08 00:11:43 -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
232ea221b4
First batch of large Color refactoring and simplification.
...
Work in progress.
2013-04-07 10:03:51 -07:00
Jürg Lehni
18ed9010a6
Derive Item#type from Item#_class and use that instead in code that depends on Item types.
2013-04-06 18:07:30 +02:00
Jürg Lehni
f43b322d2a
Rename Base#_type property to #_class.
2013-04-06 09:16:08 +02:00
Jürg Lehni
d0c763f27d
Use CanvasContext#save() and #restore() in Item#rasterize().
2013-03-19 21:36:11 -07:00
Jürg Lehni
9c38a76525
Add support for Item#data serialization.
2013-03-19 17:52:46 -07:00
Jonathan Puckey
58247ea232
Fix bug in Raster#getSubImage and add test.
2013-03-17 18:57:16 +01:00
Jonathan Puckey
0d3f746c10
Have Raster constructor set Raster#_size to [0, 0] if it was not set.
2013-03-17 17:04:56 +01:00
Jonathan Puckey
5777c7a772
Fix problem where calling new Raster().setSize(size) threw an error.
2013-03-17 16:55:57 +01:00
Jonathan Puckey
f4c1f6a3c1
Remove todo.
2013-03-17 16:40:59 +01:00
Jonathan Puckey
9f466bbc97
Fix mistake in Raster#setPixel.
2013-03-17 16:39:23 +01:00
Jonathan Puckey
1cfe34089a
Remove double space in docs.
2013-03-17 15:01:30 +01:00
Jonathan Puckey
2b7f526c62
Fix hit-testing documentation: change options.guide to options.guides.
2013-03-16 14:16:02 +01:00
Jonathan Puckey
b76f69b517
Improve Layer documentation.
2013-03-16 14:03:13 +01:00
Jonathan Puckey
7ee7a26ef4
Improve item documentation.
2013-03-16 14:02:59 +01:00
Jonathan Puckey
b23a4ede56
Improve Group documentation.
2013-03-16 13:44:58 +01:00
Jonathan Puckey
28d21bf5b1
Improve Raster documentation.
2013-03-10 23:19:59 +01:00
Jonathan Puckey
d8b0da9103
Fix small bug in Raster constructor.
2013-03-10 22:15:28 +01:00
Jonathan Puckey
71b63b0e9d
Fix documentation.
2013-03-10 19:06:37 +01:00
Jonathan Puckey
fd3fc7f2d7
Implement Item#setParent, making Item#parent writeable. Closes #186 .
2013-03-10 15:35:33 +01:00
Jonathan Puckey
25d34be59b
Implement Item#data. Closes #188 .
2013-03-10 14:59:53 +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
0e72dbd2e0
Rename Color#getCanvasStyle() to #toCanvasStyle().
2013-03-05 19:58:41 -08:00
Jonathan Puckey
97451320b9
Fix Item#type documentation.
2013-03-04 10:54:08 +01:00
Jürg Lehni
849d3efc2e
Have PathItem#setPathData() clear the previous content.
2013-03-03 16:56:48 -08:00
Jonathan Puckey
fa861f2047
Improve example documentation.
2013-03-03 20:10:25 +01:00
Jonathan Puckey
ef75bee1e5
Item documentation.
2013-03-03 18:05:41 +01:00
Jürg Lehni
0599aabdb9
Handle reinsertion of items into the same children list.
...
Fixes failing test.
2013-03-01 23:06:29 -08:00
Jürg Lehni
4be5d5086f
Introduce project.option.hitTolerance, to control precision of internal hit-tests.
2013-03-01 20:25:46 -08:00
Jürg Lehni
5140e8f003
Minor changes on documentation.
2013-03-01 20:24:26 -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
293294a55a
Have #_getCachedBounds() return clones of cached items again.
...
Fixes issue with Tadpoles example.
2013-03-01 16:05:11 -08:00
Jürg Lehni
cd58162dd5
No need to clone _matrix, since _clone() does that for us.
2013-03-01 15:55:19 -08:00
Jürg Lehni
5bbbaef618
Include clipMask in serialization.
2013-03-01 15:30:45 -08:00
Jürg Lehni
7405858f32
Simplify code for reading of named arguments, removing the need for filtering arguments by using 'in' checks instead for the presence of properties / setters.
2013-03-01 14:06:04 -08:00
Jürg Lehni
5501f48570
Move Item#toString() functionality to Base#toString().
...
For objects that define #_id and/or #_name.
2013-03-01 11:47:49 -08:00
Jürg Lehni
01026c0896
Fix support for viewBox when importing SVG symbols.
2013-03-01 10:08:17 -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
65a9795a8a
Rename #from/#toJson() to #import/#exportJson() and move them to Project / Item.
...
To reflect naming of #import/#exportSvg().
2013-02-25 16:17:33 -08:00
Jürg Lehni
326d8db4db
Do not hittest locked items.
2013-02-24 18:04:20 -08:00
Jürg Lehni
0d98727328
Simplify drawing of seleced bounds by having Item#_boundsSelelected default to true for Raster, PlacedSymbol and TextItem.
...
One can now turn it off for these using item.bounds.selected = false;
2013-02-24 15:53:37 -08:00
Jürg Lehni
6b7c6b6c4c
Implement Item#bounds.selected to control drawing of selected item bounds.
2013-02-24 15:41:31 -08:00
Jürg Lehni
afac35fabf
Improve handling of bounds caching.
...
Cloning was done in the wrong place.
2013-02-24 14:56:51 -08:00
Jürg Lehni
ac8c9cd114
Include ChangeFlag.GEOMETRY in Change.CONTENT.
...
Closes #173 .
2013-02-21 00:09:40 -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