Fix transact event handle in ve.dm.SurfaceFragment to handle array of transactions being passed as the argument (instead of just one transaction as it was before).

Change-Id: Ic8f26424594cbd4a89da7e4eefb825977f440786
This commit is contained in:
Inez Korczynski 2012-08-20 17:49:16 -07:00
parent 59815c2548
commit 053d5ffa5f

View file

@ -50,10 +50,12 @@ ve.dm.SurfaceFragment = function ( surface, range, autoSelect ) {
* This keeps the range of this fragment valid, even while other transactions are being processed.
*
* @method
* @param {ve.dm.Transaction} tx Transaction that's just been processed
* @param {ve.dm.Transaction[]} txs Transactions that's just been processed
*/
ve.dm.SurfaceFragment.prototype.onTransact = function( tx ) {
this.range = tx.translateRange( this.range );
ve.dm.SurfaceFragment.prototype.onTransact = function( txs ) {
for( var i = 0; i < txs.length; i++ ) {
this.range = txs[i].translateRange( this.range );
}
};
/**