mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-11 05:56:11 +00:00
26a1d8986b
Change-Id: I2717300e6cc6102296a2b8d063d344fa5897c825
42 lines
992 B
JavaScript
42 lines
992 B
JavaScript
/*!
|
|
* VisualEditor ContentEditable AnnotationFactory class.
|
|
*
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* ContentEditable annotation factory.
|
|
*
|
|
* @class
|
|
* @extends OO.Factory
|
|
* @constructor
|
|
*/
|
|
ve.ce.AnnotationFactory = function VeCeAnnotationFactory() {
|
|
// Parent constructor
|
|
OO.Factory.call( this );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ce.AnnotationFactory, OO.Factory );
|
|
|
|
/* Methods */
|
|
|
|
/**
|
|
* Check if an annotation needs to force continuation
|
|
* @param {string} type Annotation type
|
|
* @returns {boolean} Whether the annotation needs to force continuation
|
|
*/
|
|
ve.ce.AnnotationFactory.prototype.isAnnotationContinuationForced = function ( type ) {
|
|
if ( type in this.registry ) {
|
|
return this.registry[type].static.forceContinuation;
|
|
}
|
|
return false;
|
|
};
|
|
|
|
/* Initialization */
|
|
|
|
// TODO: Move instantiation to a different file
|
|
ve.ce.annotationFactory = new ve.ce.AnnotationFactory();
|