mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Merge "Fix annotation object creation in SurfaceFragment"
This commit is contained in:
commit
bc8b042e5f
|
@ -19,6 +19,8 @@
|
|||
* this.data by overriding getAnnotationData(). Subclasses can read from this.data but must not
|
||||
* write to it directly.
|
||||
*
|
||||
* TODO: Make this constructor optionally accept a data object instead of an element.
|
||||
*
|
||||
* @class
|
||||
* @abstract
|
||||
* @constructor
|
||||
|
|
|
@ -358,7 +358,8 @@ ve.dm.SurfaceFragment.prototype.annotateContent = function ( method, type, data
|
|||
return this;
|
||||
}
|
||||
var tx,
|
||||
annotation = { 'type': type };
|
||||
annotation = ve.dm.annotationFactory.create( type );
|
||||
// HACK: This seems wrong, the way we create annotations should be refactored
|
||||
if ( data ) {
|
||||
annotation.data = data;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue