mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Cleanup terms used in annotation method
Change-Id: I509a1f1b680cc8a2973188f0ed7c7d67b8a15f4f
This commit is contained in:
parent
1fa462ce92
commit
d37a325f44
|
@ -307,7 +307,7 @@ ve.ce.Surface.prototype.pollChanges = function( async ) {
|
|||
};
|
||||
|
||||
ve.ce.Surface.prototype.annotate = function( method, annotation ) {
|
||||
var range = this.model.getSelection(),
|
||||
var selection = this.model.getSelection(),
|
||||
_this = this;
|
||||
|
||||
if ( method === 'toggle' ) {
|
||||
|
@ -318,9 +318,9 @@ ve.ce.Surface.prototype.annotate = function( method, annotation ) {
|
|||
method = 'set';
|
||||
}
|
||||
}
|
||||
if ( range.getLength() ) {
|
||||
if ( selection.getLength() ) {
|
||||
var tx = this.model.getDocument().prepareContentAnnotation(
|
||||
range, method, annotation
|
||||
selection, method, annotation
|
||||
);
|
||||
|
||||
// transact with autoRender
|
||||
|
@ -330,7 +330,7 @@ ve.ce.Surface.prototype.annotate = function( method, annotation ) {
|
|||
|
||||
this.clearPollData();
|
||||
|
||||
_this.showSelection( range );
|
||||
_this.showSelection( selection );
|
||||
} else {
|
||||
if ( method === 'set' ) {
|
||||
this.addInsertionAnnotation( annotation );
|
||||
|
|
Loading…
Reference in a new issue