Commit graph

2626 commits

Author SHA1 Message Date
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
Jürg Lehni
1d6cfeeb9b Add dest and dontNotifty arguments to Matrix#_transformBounds() and use them where appropriate. 2011-11-24 11:29:35 +01:00
Jürg Lehni
3f5e68aa76 Document the private getPendPadding() function. 2011-11-24 10:21:12 +01:00
Jürg Lehni
29aaf38320 Improve comments. 2011-11-24 10:17:31 +01:00
Jürg Lehni
8a53288b1e Add comment about upcoming changes relating to bounds. 2011-11-23 18:13:21 +01:00
Jürg Lehni
cd1810e6a3 Fix arguments check in Path#getHandleBounds(). 2011-11-23 18:13:05 +01:00
Jürg Lehni
11f298c994 Start adding support for PointText#bounds and multi-line text, work in progress. 2011-11-23 18:12:41 +01:00
Jürg Lehni
eb70c4de5d Directly pass matrix argument to _getBounds() instead of whole arguments array. 2011-11-20 18:51:34 +01:00
Jürg Lehni
75072bde4f Directly access project.view. 2011-11-18 20:33:27 +01:00
Jürg Lehni
44291fe33b Support injecting multiple object parameters into Style classes. 2011-11-18 20:08:54 +01:00
Jürg Lehni
4106cc3621 Fix prepro.js for Opera by avoiding 'self' as variable name. 2011-11-18 20:08:17 +01:00
Jürg Lehni
5f0da04daf Add empty line at file end. 2011-11-18 19:54:16 +01:00
Jürg Lehni
b9f6c99dcd Add comments and clean up code. 2011-11-17 19:28:05 +01:00
Jürg Lehni
427cc21b3a Fix a comment. 2011-11-17 00:06:21 +01:00
Jürg Lehni
1b484a2f7b Implement MouseEvent#delta for Item#onMouseDrag and #onMouseMove. 2011-11-17 00:04:30 +01:00
Jürg Lehni
cf54b1a7c1 Change parameter sequence in mouse event code. 2011-11-16 23:47:51 +01:00
Jürg Lehni
9061daa935 Simplify event handling code. 2011-11-16 23:41:47 +01:00
Jürg Lehni
80d3763c39 Implement Item#onMouseDrag evnets, and have them silence #onMouseMove events if both are present. 2011-11-16 23:30:14 +01:00
Jürg Lehni
d066ad775d Implement Item#onClick and #onDoubleClick. 2011-11-16 23:18:27 +01:00
Jürg Lehni
b3bf57c8e9 Implement Item#onMouseEnter / #onMouseLeave. 2011-11-16 22:59:39 +01:00
Jürg Lehni
c0e6d5b2ee Remove unused injection scopes. 2011-11-16 22:54:03 +01:00
Jürg Lehni
44bf596e51 Finish implementing Item#onMouseMove and clean up code. 2011-11-16 22:48:38 +01:00
Jürg Lehni
8efc7ce7cd Implement Item#onMouseUp events and work on #onMouseMove. 2011-11-16 22:41:22 +01:00
Jürg Lehni
57bd659023 Move Item base mouse handling code to CanvasView. 2011-11-16 13:12:41 +01:00
Jürg Lehni
577c884a70 Prepend non-public Tool methods with '_'. 2011-11-16 13:10:39 +01:00
Jürg Lehni
1eff9741a4 Separate Canvas related code from View into CanvasView class. 2011-11-14 20:18:08 +01:00
Jürg Lehni
c85f0326c3 Simplify installling of mouse handlers in View. 2011-11-14 13:32:03 +01:00