Commit graph

2502 commits

Author SHA1 Message Date
Jürg Lehni
3e87eed416 Fix tests using applyMatrix() calls after bounds are changed.
To be decided if changing bounds should implicitly apply matrices?
2011-12-18 16:57:29 +01:00
Jürg Lehni
e1c8c48f11 Increase default type size to 12px. 2011-12-18 16:56:31 +01:00
Jürg Lehni
e52d2a08b8 Use correct flags in _changed() call. 2011-12-18 16:56:18 +01:00
Jürg Lehni
554047ae38 Expose Item#_getCachedBounds and use it in PlacedSymbol for proper handling of nested matrices. 2011-12-18 16:55:56 +01:00
Jürg Lehni
d2b1c77686 No need to call #getDefinition() internally.
Use private value directly.
2011-12-18 16:55:24 +01:00
Jürg Lehni
9e5eb17264 Improve Item#transform() and implement #applyMatrix() to support nested matrices. Work in progress. 2011-12-18 16:54:21 +01:00
Jürg Lehni
b0b49d027a Remove unused parameter. 2011-12-10 20:05:26 +01:00
Jürg Lehni
c8f3f3be27 Document Base.hyphenate() 2011-12-10 19:57:18 +01:00
Jürg Lehni
bc759274a1 Improve messages in bounds tests. 2011-12-09 21:29:22 +01:00
Jürg Lehni
120ead209e Define Segment#clone(). 2011-12-07 11:54:41 +01:00
Jürg Lehni
566aaed0be Define Segment#equals(). 2011-12-07 11:53:07 +01:00
Jürg Lehni
6e5e54cfe6 Change sequence of position / bounds related properties. 2011-11-30 18:36:44 +01:00
Jürg Lehni
f895d3e6fb Fix recently introduced error in Item#setSelected(). 2011-11-30 18:28:11 +01:00
Jürg Lehni
d8f0105fb2 Document support for dontLink parameter. 2011-11-30 18:19:39 +01:00
Jürg Lehni
a26bc87686 Implement support for Item#matrix in Item#draw(). 2011-11-30 18:19:23 +01:00
Jürg Lehni
a57070e4a3 Fix bounds caching issues on Group. 2011-11-30 18:18:51 +01:00
Jürg Lehni
a3ec184873 Add dontLink argument to Item#getPosition()
And use it to optimise up #setPosition().
2011-11-30 18:18:24 +01:00
Jürg Lehni
bb1d436281 Move creation of LinkedRectangle for 'bounds' to bounds accessor. 2011-11-30 17:20:29 +01:00
Jürg Lehni
3ece08bea1 Fix handling of recursion in Item#setSelected() / #setFullySelected(). 2011-11-30 17:16:52 +01:00
Jürg Lehni
cf4c2b4919 Move #matrix accessor from PlacedItem to Item. 2011-11-29 17:19:31 +01:00
Jürg Lehni
5ff3a07b31 Add comment about 1px rectangle in Raster#getAverageColor(). 2011-11-29 17:19:15 +01:00
Jürg Lehni
b5e46971f0 Replace new Size(x, y) calls with internal Size.create(x, y). 2011-11-29 17:11:15 +01:00
Jürg Lehni
26210fb95b Implement transforming of cached bounds again, if possible. 2011-11-28 23:20:47 +01:00
Jürg Lehni
cadc2e78ca We can directly access Item#_id.
No need to call Item#getId() internally.
2011-11-28 23:14:02 +01:00
Jürg Lehni
cb8c94ef7e Recursively call _clearBoundsCache
If the cache for an item's children is not valid anymore, that needs to propagate up the DOM tree.
2011-11-28 23:13:31 +01:00
Jürg Lehni
853263263e Implement tests for bounds caching. 2011-11-28 22:59:34 +01:00
Jürg Lehni
d3c83be3bb Correct execution sequence in getBounds so that the parent's _boundsCache is kept up to date even when the child is returning a cached result. 2011-11-28 22:59:25 +01:00
Jürg Lehni
e82deff4b9 Fix the drawing of PlacedSymbol bounds when selected. 2011-11-27 14:55:49 +00:00
Jürg Lehni
ac18786109 Implement bounds caching for all items, even groups and layers, using a smart structure keeping track of which items affect the cache, and automatically clearing it on changes without having to walk the DOM tree. 2011-11-27 13:48:15 +00:00
Jürg Lehni
907d6c0954 Implement Matrix#equals(). 2011-11-26 12:04:44 +01:00
Jürg Lehni
b51cf064b0 Make baseItem to last optional parameter of _getBounds. 2011-11-26 11:55:19 +01:00
Jürg Lehni
f799c85e76 Switch to using 'this' in private getBounds methods to point to path item rather than 'that'. 2011-11-26 11:48:08 +01:00
Jürg Lehni
40a3272cb3 Implement PointText#bounds properly, with matrix support in place now. 2011-11-26 11:40:38 +01:00
Jürg Lehni
a0ad81b576 Pass on the baseItem of a getBounds call, required to implement proper caching later. 2011-11-26 11:24:48 +01:00
Jürg Lehni
8729e9919f Use getBounds.call(item) to use this instead of item, since we're accessing it a lot. 2011-11-26 10:42:38 +01:00
Jürg Lehni
1fd9242fd8 Define private getBounds() function that handles matrix concatenation, bounds caching and calling of _getBounds, leading to further simplifications in PlacedItem. 2011-11-26 10:39:51 +01:00
Jürg Lehni
2605fadcfd Move bounds related code to a proper inejction scope, so we can declare private functions for caching. 2011-11-26 10:18:47 +01:00
Jürg Lehni
de4b5a0d87 Start implementing Item#matrix, work in progress. 2011-11-26 10:15:01 +01:00
Jürg Lehni
92066a6ecb Implement Item#_boundsType as a structure to control bounds handling and caching. 2011-11-24 16:03:05 +01:00
Jürg Lehni
a6b90dea35 Clean up Item documentation. 2011-11-24 16:02:34 +01:00
Jürg Lehni
44b6fe9f0d Fix documentation about bounds beans. 2011-11-24 15:46:06 +01:00
Jürg Lehni
310fbb260b Remove _boundsCache and replace it with easier _simpleBounds flag. 2011-11-24 15:44:26 +01:00
Jürg Lehni
067e0a954b Add comment about LinkedRectangle for 'bounds'. 2011-11-24 15:39:04 +01:00
Jürg Lehni
909b9040d5 Since we only use _createBounds in one place now we can inline it. 2011-11-24 15:38:08 +01:00
Jürg Lehni
569c415b2f Start implementing bounds caching the new way.
Work in progress still.
2011-11-24 15:37:44 +01:00
Jürg Lehni
c989d3ee3f Restructure code a bit for easier reading. 2011-11-24 15:18:57 +01:00
Jürg Lehni
ea87be166e Part one of big refactoring of bouding box handling. Functional, but caching is broken right now. 2011-11-24 15:13:21 +01:00
Jürg Lehni
ee23f64642 We cannot use PaperScript extensions in tests. 2011-11-24 14:54:30 +01:00
Jürg Lehni
d9777111dc No need for an injection scope as we can also just use Base.each() in combination with a side-car. 2011-11-24 14:54:04 +01:00
Jürg Lehni
b96cd4e1c8 Add comments about possible optimization of accessing of style properties. 2011-11-24 14:53:38 +01:00