Oliver Sartun
2029406333
Removing the section on "Problems that may occur"
2013-10-24 20:05:09 +02:00
Oliver Sartun
84ea6d3603
Added the documentation for addUndoType, changeUndoType and removeUndoType
2013-10-24 20:01:06 +02:00
Oliver Sartun
c199856d24
Added a code example to the description of 'on' in the UndoTypes section
2013-10-24 19:12:38 +02:00
Oliver Sartun
0288f4569f
Extended the description about UndoTypes
2013-10-24 19:05:51 +02:00
Oliver Sartun
cc62b47a9d
Updated the documentation
2013-10-24 15:49:17 +02:00
Oliver Sartun
e629e5cb56
Removed the unregistration and new registration while merging undoManagers
2013-10-24 15:22:34 +02:00
Oliver Sartun
db4982299b
Rewritten major parts of the description
2013-10-24 14:21:57 +02:00
Oliver Sartun
280681da4c
Removed the only reference to jQuery, so, jQuery is no longer a dependency for Backbone.Undo.js
2013-10-24 13:59:52 +02:00
Oliver Sartun
7f3534ef6c
Rewritten almost all unit tests to make use of the new ability to make synchronous calls
2013-10-24 12:02:00 +02:00
Oliver Sartun
ea15fe0f4c
The merge function can now handle merge several undoManagers at once by passing several arguments or an array as the argument
2013-10-24 12:02:00 +02:00
Oliver Sartun
fc7d2bfa96
Rephrased comments
2013-10-24 12:02:00 +02:00
Oliver Sartun
1731e34928
The merge direction was changed: The stack-reference of the passed undoManagers is set to the stack of the undoManager the merge method is called on
2013-10-24 12:02:00 +02:00
Oliver Sartun
3ef848ac25
The merge method now makes use of the unregisterAll method
2013-10-24 12:02:00 +02:00
Oliver Sartun
8938a0dc84
The check if an object is registered now happens in the objectRegistry
...
register and unregister are returning true now, if they successfully
register resp. unregister an object
2013-10-24 12:02:00 +02:00
Oliver Sartun
6ec2869cc8
defaults function added for globally changing/setting the UndoManager's default values
2013-10-24 12:02:00 +02:00
Oliver Sartun
b01f919b9a
Feature: You can register objects on instantiation now
...
No need for calling the register method afterwards anymore. Pass an
array or a single object
2013-10-24 12:02:00 +02:00
Oliver Sartun
ab20281c58
The "change" UndoType now rightfully unsets added attributes on undo/redo
2013-10-24 12:02:00 +02:00
Oliver Sartun
65fead3ffa
The UndoTypes function get the "options" object passed as the fourth argument instead of the UndoAction's data
...
This change can break compatibility with externally added UndoTypes
2013-10-24 12:02:00 +02:00
Oliver Sartun
3829003ad3
Comment slightly changed
2013-10-24 12:02:00 +02:00
Oliver Sartun
46bd67b72b
Added method unregisterAll to unregister all registered objects
2013-10-24 12:01:59 +02:00
Oliver Sartun
1623d0be70
Added a whole lotta comments
2013-10-24 12:01:59 +02:00
Oliver Sartun
17c66ee928
Renamed "cycleIndex" into "magicCondensationIndex" and made the magicCondensation an Opt-In
...
By altering the default behaviour and making magicCondensation and
opt-in, this version of Backbone.Undo is not backward compatible anymore
2013-10-24 12:01:59 +02:00
Oliver Sartun
51a06f7bf1
Typo corrected
...
Jeez! Have I been asleep while writing that?
2013-09-23 11:48:43 +02:00
Oliver Sartun
a78d7c8bf8
Deeper integration of undoTypes-"condition"-function
...
Instead of getting called from within the "on"-function, the
"condition"-function now gets called by the addToStack function. That
way its better suitable for custom undoTypes or changed undoTypes, as
the authors of these undoTypes don't have to manually integrate it into
their implementation.
2013-07-06 17:01:28 +02:00
Oliver Sartun
7df7d2ae2f
The undoTypes now have a "condition" function that is called in the "on"-Handler
...
The "condition" function gets called with the same arguments like the
"on" function. If it returns true, the "on" function continues and
creates the UndoAction-data. If it returns false, no UndoAction gets
created
2013-07-06 16:00:46 +02:00
Oliver Sartun
9fa2990957
Bugfix: The undoTypes-object is now stored/referenced per UndoAction
2013-07-06 15:54:51 +02:00
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