Add a note that I need to implement insert and remove as replace

Change-Id: Id076921707bf6295a6bbac3264fa0074178e9321
This commit is contained in:
Catrope 2012-04-20 14:40:58 -07:00
parent 3d6391419d
commit d1d70ddf3e

View file

@ -56,6 +56,7 @@ ve.dm.Transaction.prototype.pushRetain = function( length ) {
* @param {Array} data Data to retain
*/
ve.dm.Transaction.prototype.pushInsert = function( data ) {
// FIXME use replace operations instead
var end = this.operations.length - 1;
if ( this.operations.length && this.operations[end].type === 'insert' ) {
this.operations[end].data = this.operations[end].data.concat( data );
@ -75,6 +76,7 @@ ve.dm.Transaction.prototype.pushInsert = function( data ) {
* @param {Array} data Data to remove
*/
ve.dm.Transaction.prototype.pushRemove = function( data ) {
// FIXME use replace operations instead
var end = this.operations.length - 1;
if ( this.operations.length && this.operations[end].type === 'remove' ) {
this.operations[end].data = this.operations[end].data.concat( data );