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