Commit Graph

104 Commits

Author SHA1 Message Date
Oliver Sartun
33b05920ea Added the possibility to start tracking right away by passing {track: true} to the constructor 2013-06-30 16:57:04 +02:00
Oliver Sartun
5ddef62b54 Added tests for 'merge' and the objectRegistry 2013-06-29 19:48:15 +02:00
Oliver Sartun
32d3cf4e60 The objectRegistry and the ownedUndoTypes are now properties of the undoManager and not of the undoStack. This was necessary to get 'merge' running 2013-06-29 19:47:33 +02:00
Oliver Sartun
178d9ecb73 Bugfix: changingUndoType always took effect globally and never per instance. Fixed. 2013-06-29 19:45:46 +02:00
Oliver Sartun
878cea2009 Minor changes to JSDoc comments 2013-06-29 19:44:33 +02:00
Oliver Sartun
1cbb59690f Fixed bug in objectRegistry's 'get' function 2013-06-29 19:43:50 +02:00
Oliver Sartun
bf6cb099fd Documented the code by using JSDoc 2013-06-29 01:14:21 +02:00
Oliver Sartun
b2fd78e5d4 Repositioned the manipulateUndoType function 2013-06-29 01:14:21 +02:00
Oliver Sartun
dfef4d0390 Shortened the hasKey function by using _.all 2013-06-29 01:14:21 +02:00
Oliver Sartun
be360f87f9 Repositioned the slice function within the code 2013-06-29 01:14:21 +02:00
Oliver Sartun
e6c376b8c5 Updated Backbone.min.js 2013-06-28 16:34:31 +02:00
Oliver Sartun
17fe0732f7 Fixed bug in the ObjectRegistry's 'get' function that only returned objects which didn't had a cid 2013-06-28 16:27:48 +02:00
Oliver Sartun
fa9d20b085 Indented something for better legibility 2013-06-28 16:14:27 +02:00
Oliver Sartun
f77a949c20 Added merge function
The merge function enables to "merge" several undoManagers so that they
write on only one stack
2013-06-28 16:13:59 +02:00
Oliver Sartun
4bb3c1454d isAvailable("undo" / "redo") now returns wether there are actions in the stack to be undone / redone or not 2013-06-28 16:12:46 +02:00
Oliver Sartun
18bc3aaf6f The manager now triggers a Backbone-Event "undo" or "redo" after something was undone / redone 2013-06-28 16:11:37 +02:00
Oliver Sartun
bee60d6c65 Added a 'get' function to the ObjectRegistry to get a copy of the registered objects 2013-06-28 16:10:20 +02:00
Oliver Sartun
c580fc04c4 Explained the way the ObjectRegistry registeres objects in a lengthy comment 2013-06-28 16:09:14 +02:00
Oliver Sartun
63b52142c0 Increased the number of arguments the apply function uses 'call' for from 3 to 4 2013-06-28 16:08:36 +02:00
Oliver Sartun
2154f097e8 Corrected Minified version 2013-06-24 17:57:42 +02:00
Oliver Sartun
a37970a352 Removed Bug 2013-06-24 17:56:12 +02:00
Oliver Sartun
2edb5d0931 Updated Minified version 2013-06-24 18:55:32 +03:00
Oliver Sartun
8076868052 Added "addUndoType", "changeUndoType" and "removeUndoType" to manipulate the global and the local UndoTypes-Object 2013-06-24 17:25:19 +02:00
Oliver Sartun
5bb5a7de35 Minor changes or bugfixes 2013-06-21 19:16:24 +02:00
Oliver Sartun
ee6001983d Repositioned the definition of the "reset" UndoType 2013-06-21 19:16:03 +02:00
Oliver Sartun
674efa9507 Added possibility to have undoTypes per instance
Instead of one global UndoTypes object, every UndoManager now has the
possibility to have a custom UndoTypes object. The great thing: Nothing
changes for those who don't want to use a custom one. Global changes of
the undoTypes still take effect on all instances, just as changes on
one instance don't intermingle with the global object.
2013-06-21 19:13:31 +02:00
Oliver Sartun
dc8fb5dafd Added comment 2013-06-21 19:07:12 +02:00
Oliver Sartun
ce8e40c9e2 Added a sample 2013-05-28 20:32:30 +02:00
Oliver Sartun
e3f874236d Added uglified (compressed) version 2013-05-28 17:52:13 +02:00
Oliver Sartun
37a9a44a90 Formatting changes 2013-05-28 17:39:45 +02:00
Oliver Sartun
f74df3c85e Minor Change 2013-05-28 18:36:32 +03:00
Oliver Sartun
09ebfa61cb Explained addUndoType further 2013-05-28 17:04:20 +02:00
Oliver Sartun
d8cd371991 Minor changes 2013-05-28 16:53:46 +02:00
Oliver Sartun
7f9b2dbf3b Added .gitignore 2013-05-28 16:46:52 +02:00
Oliver Sartun
0987209695 Added License note 2013-05-28 16:46:20 +02:00
Oliver Sartun
a21cf13dd8 Definition of the "reset"-UndoType was placed before the "change"-definition to have all collection-related undo-Types together 2013-05-28 16:46:20 +02:00
Oliver Sartun
24762e5993 undo/redo functions only get a copy of the action-data to prevent manipulation of attributes like cycleIndex 2013-05-28 16:46:20 +02:00
Oliver Sartun
9ec187d840 Minor change 2013-05-28 17:38:33 +03:00
Oliver Sartun
8258b4a7fa Formatted License note 2013-05-28 16:37:27 +02:00
Oliver Sartun
bd12f99ef4 Added License note 2013-05-28 17:36:51 +03:00
Oliver Sartun
51126cb2d2 Completed, except for licensing 2013-05-28 16:53:01 +03:00
Oliver Sartun
0c54a3b055 Completed overview about prototype-Methods 2013-05-28 14:57:27 +02:00
Oliver Sartun
638e8f1d61 Continued writing
Began to give an overview about Backbone.Undo methods
2013-05-28 11:58:32 +03:00
Oliver Sartun
e574e51313 Minor changes 2013-05-27 22:59:55 +02:00
Oliver Sartun
0a29d18b88 Minor changes 2013-05-27 23:58:14 +03:00
Oliver Sartun
dd4367846c Continued writing 2013-05-27 22:57:27 +02:00
Oliver Sartun
eb0d70834b grammar corrected 2013-05-27 21:29:23 +03:00
Oliver Sartun
463f810910 strong instead of emphasized 2013-05-27 21:28:18 +03:00
Oliver Sartun
5d61595210 Added awesome-line 2013-05-27 20:27:27 +02:00
Oliver Sartun
be68c9e702 Grammar mistake corrected 2013-05-27 21:25:22 +03:00