mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Add a note that I need to implement insert and remove as replace
Change-Id: Id076921707bf6295a6bbac3264fa0074178e9321
This commit is contained in:
parent
3d6391419d
commit
d1d70ddf3e
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue