defaults function added for globally changing/setting the UndoManager's default values

This commit is contained in:
Oliver Sartun 2013-10-23 16:41:48 +02:00
parent b01f919b9a
commit 6ec2869cc8

View File

@ -738,6 +738,14 @@
});
_.extend(UndoManager, {
/**
* Change the UndoManager's default attributes
* @param {Object} defaultAttributes An object with the new default values.
* @return {undefined}
*/
defaults: function (defaultAttributes) {
_.extend(UndoManager.prototype.defaults, defaultAttributes);
},
/**
* Add an UndoType to the global UndoTypes-object.
* @param {String} type The event this UndoType is made for