Temporary fix for transact method to accept array of transactions.

This commit is contained in:
Inez Korczynski 2011-12-08 01:17:08 +00:00
parent 7da531b59e
commit 8fece3a241

View file

@ -120,6 +120,14 @@ es.SurfaceModel.prototype.pushSelection = function( selection ) {
* (such as when replacing - delete, then insert)
*/
es.SurfaceModel.prototype.transact = function( transaction, isPartial ) {
if(es.isArray(transaction)) {
for( var i = 0; i < transaction.length; i++ ) {
this.transact( transaction[i] );
}
return;
}
// console.log( 'tx:' + $.map( transaction.getOperations(), function(tx) { return tx.type; } ).join(",")
// + ' isPartial:' + isPartial );
this.doc.commit( transaction );