Commit graph

71 commits

Author SHA1 Message Date
Jürg Lehni
c945bf7908 Docs: Various smaller clean ups. 2013-10-16 14:20:13 +02: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
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
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
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
4e6f52c20c Remove need for _needsRedraw() calls by replacing it with a boolean flag. 2013-05-27 23:40:23 -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
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
Jonathan Puckey
daf8d0f881 Rename 'properties' constructor parameter to 'object' in docs. 2013-04-21 13:54:31 +02:00
Jürg Lehni
f43b322d2a Rename Base#_type property to #_class. 2013-04-06 09:16:08 +02:00
Jonathan Puckey
b76f69b517 Improve Layer documentation. 2013-03-16 14:03:13 +01: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
6c9c16ad3d Update copyright information comments, and year. 2013-01-28 18:03:27 -08:00
Jürg Lehni
18572276c5 Fix a bug with new _drawCount code.
Make sure items are considered selected right away if they are part of the DOM, even before they are getting drawn for the first time.
2013-01-20 15:56:58 -08:00
Jürg Lehni
50ee598bca Introduce Project#_drawCount mechanism as a better and more efficient way to filter out selected items that are not currently part of the DOM. 2013-01-20 14:01:43 -08:00
Dmitri Iouchtchenko
ae7e6ee6b3 Fix insertBelow for Layer objects 2012-11-19 23:41:04 -05:00
Jürg Lehni
19d145f281 Introduce Item#type, returning a simple item type string identifier. 2012-11-03 23:43:18 -07:00
Jonathan Puckey
52385451f6 Resolve a few documentation todos. 2011-11-12 18:30:21 +01:00
Jürg Lehni
79c0ad8cc5 Update copyright notices. 2011-07-01 12:17:45 +02:00
Richard D. Worth
ac39873693 Whitespace. Removed all trailing whitespace from .js files 2011-06-30 06:01:51 -04:00
Jürg Lehni
7cd749e63d Change all documentation to new convention of defining @class outside injection scope, fix some comments and a few errors with examples. 2011-06-22 23:56:05 +01:00
Jürg Lehni
a45340d20f Revert previous change since arguments.length is wrong when parameters are undefined when using Function#call. 2011-06-20 14:37:09 +01:00
Jürg Lehni
5ce49e6f8f Merge remote-tracking branch 'origin/master' 2011-06-20 14:26:05 +01:00
Jürg Lehni
2c68e7e58f Use faster Function#call() when arguments are clear. 2011-06-20 14:25:27 +01:00
Jonathan Puckey
e23282fe05 Documentation: convert Array return types to Type[]. 2011-06-20 15:19:08 +02:00
Jürg Lehni
596cc8f83b Implement #_needsRedraw() mechanism in PaperScope and Project, to notify Views of redraws required by changes in appearance. 2011-06-19 23:03:18 +01:00
Jürg Lehni
f0bc3f115b Have all visual changes include ChangeFlags.APPEARANCE. 2011-06-19 22:20:28 +01:00
Jürg Lehni
2594a41b7d Remove the mention of optional parameters in documentation, as they are marked optional already. 2011-06-19 21:52:52 +01:00
Jürg Lehni
cb61e8d452 Implement rest of ChangeFlags.HIERARCHY notifications. 2011-06-19 21:49:26 +01:00
Jürg Lehni
bf627d9d9c Remove all beans: true settings. 2011-06-19 18:54:41 +01:00
Jürg Lehni
7d2f10f22b Rename private move() -> insert(), to reflect recent name changes. 2011-06-19 18:50:23 +01:00
Jürg Lehni
f474bd9085 No need to redefine deprecated #moveAbove()/Below(), since they're redirecting to #insertAbove()/Below(). 2011-06-19 17:33:28 +01:00
Jürg Lehni
812d3fb366 Rename #_removeFromParent() -> #_remove(). 2011-06-19 17:32:43 +01:00
Jürg Lehni
4eb6d78f1f Have #_removeFromParent() handle deselection and change notification. 2011-06-19 17:30:47 +01:00
Jonathan Puckey
6fc08c6417 Item: implement #addChild(item), #insertChild(index, item), #insertAbove(item) and #insertBelow(item) Deprecate: #moveAbove, #moveBelow, #appendTop, #appendBottom. 2011-06-17 16:58:41 +02:00
Jürg Lehni
cb463b74f5 Fix @extends tags in documentation: Only the immediately following class is required. 2011-06-16 21:43:31 +01:00
Jonathan Puckey
17fcb923ff Documentation: rearrange @example tags, improve examples, rename boolean -> Boolean and misc smaller edits. 2011-05-30 19:42:17 +02:00
Jonathan Puckey
1520cad144 Documentation: capitalize basic types in @ tags. 2011-05-27 21:21:49 +02:00
Jonathan Puckey
ca3230c1ad Documentation: reorder functions, add group titles and todos. 2011-05-27 13:28:13 +02:00
Jonathan Puckey
d0ecd6a4ad Layer: small edit to constructor docs. 2011-05-23 17:02:22 +02:00
Jonathan Puckey
59af5343b5 Add Layer documentation. 2011-05-23 17:00:37 +02:00
Jürg Lehni
b461368b18 Found a clean way for Layer#initialize() to call this.base() too, without implicitely calling paper.project.activeLayer.appendTop. 2011-05-21 01:05:22 +01:00
Jürg Lehni
e5f8ee0464 Write comment about calling base() from Layer#initialize(). 2011-05-17 13:14:23 +01:00
Jürg Lehni
cfe968d30e Rename Document -> Project, DocumentView -> ProjectView, paper.document -> paper.project and paper.documents -> paper.projects, to avoid name clashing with window.document. 2011-05-16 13:33:15 +01:00
Jonathan Puckey
d998cd30f3 Add support for accessing items by name through their parent's children list. 2011-05-15 19:12:27 +02:00
Jürg Lehni
0bab694a01 Rename Item#children to private Item#_children and add #getChildren getter. 2011-05-14 18:07:10 +01:00