Jürg Lehni
59b7da0ed5
Fall back to pixelRatio 1 when none is defined.
...
Required in Item#rasterize() for non-native blend modes. This broke phantomjs tests.
2015-07-27 09:56:37 +02:00
Jürg Lehni
cce42bc6f2
Filter out project
key in object literal constructor.
...
It was causing issues when running test suites in phantomjs.
2015-07-26 14:01:00 +02:00
sapics
d99b2be49a
add param to raster.todataurl
2015-07-14 10:17:20 +09:00
sapics
da2caa999e
item.setMatrix useful
2015-07-11 18:31:03 +09:00
sapics
d7a4dd2780
rect -> rectangle
2015-07-03 10:00:57 +09:00
Jürg Lehni
708e8d7834
Include documentation about importSVG() onLoad callbacks.
...
See #715 .
2015-06-23 09:40:11 +02:00
Jürg Lehni
4fde7ab37d
Add applyMatrix option to importSVG()
2015-06-16 17:52:34 +02:00
Jürg Lehni
b541088c6f
A whole lot of documentation clean-up.
2015-06-16 17:50:37 +02:00
Jürg Lehni
2cf6cd7a14
Correctly clone all attributes in Shape#toPath() and Path#toShape()
...
Also write documentation for both methods.
Closes #622 .
2015-06-16 14:30:40 +02:00
Jürg Lehni
ba12eec7f5
Some documentation clean-up.
...
- Prefer @return over @returns
- Place @see at the end, before @example
2015-06-16 14:08:34 +02:00
Jürg Lehni
c7281ee619
Properly handle bounds caching when items are empty first.
...
Closes #676 .
2015-06-15 19:04:15 +02:00
Jürg Lehni
6ec34fbb60
Replace Lenna with Marilyn.
2015-05-31 10:50:04 +02:00
Jürg Lehni
27bb8a356f
Implement unique ids, and fix issue with Base.deserialize()
...
Gradient and Symbol were overriding each other in the dictionary, and dictionary entries could not contain references to other dictionary entries.
Closes #690
2015-05-11 19:39:39 +02:00
Jürg Lehni
8e7829db5e
Remove obsolete comment about hitTest options merge
2015-04-12 15:07:26 +02:00
Jürg Lehni
48bc34b21f
Filter out deserialized dictionary in Base.deserialize()
...
Closes #637
2015-02-28 19:03:03 +01:00
Jürg Lehni
3b47d7ee89
Only draw Raster items when they're fully loaded.
...
Closes #645 .
2015-02-28 18:30:23 +01:00
Jürg Lehni
7c2492ac2a
Docs: Improve Item#applyMatrix.
2015-02-26 13:38:29 +01:00
Jürg Lehni
3c31c0e482
Have SVGImport respect the current PaperScope's applyMatrix setting.
2015-01-02 14:19:17 +01:00
Jürg Lehni
66c67fbe94
Improve insertion handling for Item and Layer so insertAbove() / insertBelow() works for Layers too.
...
Closes #603
2014-12-29 23:16:13 +01:00
Jürg Lehni
16105067bf
Correctly handle Item#insertChild(null)
2014-12-28 18:29:20 +01:00
Jürg Lehni
a307bc4d14
Implement recursively
parameter in Matrix#apply(), so matrices can be backed in recursively in children too.
2014-12-28 18:29:04 +01:00
Jürg Lehni
80e64ad0a9
Implement setters for Raster#width and #height, and properly handle these values being set in constructors, along with #size.
...
Closes #557 .
2014-12-28 18:27:32 +01:00
Jürg Lehni
c48f4d772e
Expose #className on all classes that define #_class
...
Closes #576
2014-11-30 11:13:51 -08:00
Jürg Lehni
19a9976939
Return emitter in #on(), #off(), #once(), so calls can be chained.
2014-11-18 14:56:55 -08:00
Jürg Lehni
0fb7e49248
Return a LinkedPoint from Item#scaling.
...
Closes #544 ,
2014-11-09 07:46:45 -08:00
Jürg Lehni
a39eea64e9
Improve docs sequence a bit.
2014-10-20 23:55:24 +02:00
Jürg Lehni
6e9ff38c15
Fix spelling mistakes in docs.
2014-10-20 23:45:33 +02:00
Jürg Lehni
e7707cd354
Implement match.inside and match.overlapping in #getItems(match).
...
Closes #275
2014-10-20 23:35:47 +02:00
Jürg Lehni
99ef521af4
Switch from inline @option tags to real doc tags.
2014-10-20 23:33:28 +02:00
Jürg Lehni
c25548031b
Clean up documentation for Project#getItems() / Item#getItems().
2014-10-20 22:44:15 +02:00
Jürg Lehni
82b988327d
Update docs to use the newly introduced {@option} tag to docuemnt option-style objects.
2014-10-20 22:41:45 +02:00
Jürg Lehni
782bde238c
Find a more general implementation for Item#intersects(item).
2014-10-20 18:00:07 +02:00
Jürg Lehni
5ddbc5b07f
Implement Item#intersects(item)
2014-10-20 17:00:18 +02:00
Jürg Lehni
4eb06f0849
Implement Item#isInside(rect).
2014-10-20 16:51:28 +02:00
Jürg Lehni
ad50e9f604
Change the way the optional matrix argument is handled in bounds getters.
...
Before it was treated as the paren't matrix and the child's was concatenated to it, but it's more logical and useful to just use it as the full replacement matrix instead.
2014-10-20 16:50:33 +02:00
Jürg Lehni
616e848376
Implement handling of empty
and editable
in #getItems(), and simplify code a bit.
2014-10-18 14:32:21 +02:00
Jürg Lehni
e7fd751765
Fix docs issues with Item#matches()
2014-10-18 13:40:36 +02:00
Jürg Lehni
be82af9b47
Implement Item#matches(name, compare), along with Item#matches(match).
2014-10-15 15:09:44 +02:00
Jürg Lehni
77f6e68846
Remove documentation for deprecated #attach() methods.
2014-10-15 13:01:59 +02:00
Jürg Lehni
3b2a82047e
Clean up event related comments, to reflect recent renaming.
2014-10-08 18:33:17 +02:00
Jürg Lehni
c7c49d4091
Time to go with the flow and use the on()/off()/emit() pattern for events.
2014-10-08 14:57:56 +02:00
Jürg Lehni
3dc5c94e25
Rename Callback mix-in to Emitter.
2014-10-08 14:13:08 +02:00
Jürg Lehni
2c9e15b070
Clean up comments.
2014-09-27 22:53:00 +02:00
Jürg Lehni
c87ce4de4c
Implement Item#replaceWith(item)
...
Closes #454
2014-09-27 22:52:37 +02:00
Jürg Lehni
91539e6bc5
Commit changes forgotten in 6450430b68
2014-09-27 22:51:22 +02:00
Jürg Lehni
6450430b68
Implement new strategy regarding Project#activeLayer:
...
- By default, no layer is created for any project.
- Project#activeLayer is a getter for the hidden #_activeLayer property. When it is called and no layer exists, one is created on the fly.
- Creating any other items creates a layer if none exists (was already the case).
2014-09-27 22:31:49 +02:00
Jürg Lehni
8b4f59962e
Allow better code compression by removing repeated variable access on this.
2014-09-27 22:00:46 +02:00
Jürg Lehni
762113230a
Implement Item#parentToLocal() and #localToParent()
...
As outlined in #530
2014-09-25 17:53:08 +02:00
Jürg Lehni
7d69ef1864
Fix documentation of bean properties that are not read-only.
...
@bean can only be used when the property is read-only or both getters and setters are present in the scope.
2014-08-26 10:01:30 +02:00
Jürg Lehni
6b4f728a72
Bring back support for paper.setup('id') again, and document it properly.
...
Closes #510 .
2014-08-20 16:53:31 +02:00
Jürg Lehni
48cb05a181
Replace tabs with 4 white-spaces.
2014-08-16 19:24:54 +02:00
Jürg Lehni
3ac9a4f369
Use local parent short-cut variable.
2014-08-15 15:38:28 +02:00
Jürg Lehni
c90a7c9f38
Only use the unmerged setting for #strokeScaling, as otherwise it'll be used on layers and groups already.
...
Closes #500
2014-07-29 23:39:51 +02:00
Jürg Lehni
12254f5fe8
Fix two documentation errors in Raster.
...
Closes #495
2014-07-26 12:07:36 +02:00
Jürg Lehni
56704b9206
Fix a bug in Item#_removeNamed() for items without parents.
...
Closes #490 .
2014-07-25 21:08:14 +02:00
Jürg Lehni
d3d9e4bada
Improve some injection blocks.
2014-07-25 20:05:26 +02:00
Jürg Lehni
3093a8ec43
Introduce matrix.chain(mx) as a shortcut to Matrix.clone().concatenate(mx)
...
Simplifies quite a few lines of code.
2014-07-08 15:43:17 +02:00
Jürg Lehni
66360bf58a
Fix minor documentation bug.
2014-07-08 15:43:17 +02:00
Jürg Lehni
5384a63238
Improve Item. _clearBoundsCache() fix.
2014-05-15 21:33:30 +02:00
Jürg Lehni
a7f57315a6
Fix Item._clearBoundsCache() recursion, correctly this time.
2014-05-15 21:30:06 +02:00
Jürg Lehni
a1c1fc8ed8
Fix an issue in _clearBoundsCache where circular recursion could happen in certain circumstances.
2014-05-15 21:24:09 +02:00
Jürg Lehni
f39b7603de
Remove pixelRatio handling from CanvasProvider and move it to Item#draw()
2014-05-15 17:14:37 +02:00
Jürg Lehni
af5e1609dd
Fix an issue where CompoundPath wouldn't draw correctly if children had styles that forced non-direct compositing.
2014-05-15 17:09:58 +02:00
Jürg Lehni
c0a911d3c7
Rename Raster#ppi to#resolution, and deprecate #ppi.
2014-05-15 15:36:24 +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
aac98f2b25
Some code clean-up.
2014-05-13 13:54:31 +02:00
Jürg Lehni
6896535663
Bring back accidentally removed ctx.beginPath();
2014-05-13 13:51:09 +02:00
Jürg Lehni
846c806034
Implement non-scaling strokes through Style#strokeScaling.
...
Closes #418 .
2014-05-13 13:38:51 +02:00
Jürg Lehni
e1ed7f3294
Prevent drawing selected compound path children twice.
2014-05-12 18:57:09 +02:00
Jürg Lehni
6aaeb81869
Simplify Item#_isUpdate() code a bit.
2014-05-07 17:27:53 +01:00
Jürg Lehni
bb6e1e686f
Improve some comments.
2014-05-07 17:22:25 +01:00
Jürg Lehni
56389a3929
Make sure _updateVersion also works for items and children of items with opacity == 0.
...
Closes #469 .
2014-05-07 16:57:39 +01:00
Jürg Lehni
312e670b22
Update Item#_updateVersion in Item#draw() before bailing out when items are invisible.
...
Closes #469 .
2014-05-05 20:13:36 +02:00
Jürg Lehni
8317aacc1b
Split Item#hitTest() into separate private function that does need to do arguments reading, for improved performance also when iterating over children.
2014-04-29 20:06:48 +02:00
Jürg Lehni
fce31599a5
Use _dontMerge for #getSelectedColor() on both item and layer, and have style getters on item pass on _dontMerge to the style object.
2014-04-29 19:40:46 +02:00
Jürg Lehni
bd07305435
Move selection drawing code to separate function and fix slowdowns in determining of selection color.
...
Closes #466 & #464 .
2014-04-29 18:52:33 +02:00
Jonathan Puckey
1d905f5c58
Path: add docs for Style Tests group and move Path#isInserted() to Hierarchy Tests group.
2014-04-28 18:41:40 +02:00
Jonathan Puckey
ba98c91509
Fix SVGElement parameter type in docs.
2014-04-28 18:23:14 +02:00
Jürg Lehni
e851090c81
Fix bug in item object literal constructor when providing parent as property after other values that depend on hierarchy being defined already.
2014-04-28 15:12:55 +02:00
Jürg Lehni
42945825e8
Fix all argument assignment TODOs.
2014-04-28 14:22:50 +02:00
Jonathan Puckey
af84a52af8
Move around Item#isInserted() code so it shows up in the Tests group section in the docs.
2014-04-27 23:59:01 +02:00
Jonathan Puckey
12d7756892
Add more matching docs.
2014-04-27 23:40:43 +02:00
Jürg Lehni
9ccba17fbe
Clean up white-space, comments and jshint errors.
2014-04-14 18:29:26 +02:00
Jürg Lehni
d0d4b29856
Fix bugs in bounds caching algorithm.
2014-04-13 18:31:01 +02:00
Jürg Lehni
6af797bbad
Optimize handling of property object in Item constructor.
...
Only check for values if it is a plain object, and avoid inserting into DOM twice if parent is specified.
2014-04-13 18:12:19 +02:00
Jürg Lehni
ee729622e0
Correctly handle Raster#setImage(null)
2014-04-13 18:11:34 +02:00
Jürg Lehni
ea81df6572
Fix spelling mistakes.
2014-04-13 17:03:44 +02:00
Jürg Lehni
db2bdf84af
Allow the JS optimizer to better do its thing by creating local references to repeatedly used class variables.
2014-04-13 16:44:49 +02:00
Jürg Lehni
397c81e060
Switch from options.type to options.class in Item#hitTest(), to reflect recent change in Item#getItems().
2014-04-13 16:43:20 +02:00
Jürg Lehni
a931a2530c
Implement options.curves
option for hit-testing curves regardless of stroke settings.
2014-04-11 14:57:58 +02:00
Jürg Lehni
1f7cb30fa5
Correctly transform Item#pivot when #matrix is applied to an item's contents.
...
Closes #452 and defines unit tests to cover this bug.
2014-04-11 13:18:27 +02:00
Jürg Lehni
eea4e533a4
Support type: Class
filters in hit-testing code too.
2014-04-10 22:27:03 +02:00
Jürg Lehni
61c2b11938
Serialize #applyMatrix before #matrix, because in deserialization its setting will affect how #matrix is read.
...
Closes #451 .
2014-04-09 11:57:25 +02:00
Jürg Lehni
60f6eca6c4
Do not keep the view's matrix baked into _globalMatrix, since we might allow multiple views soon.
2014-04-07 17:35:17 +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
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