mediawiki-extensions-Visual.../modules/ve/ce/ve.ce.AnnotationFactory.js
Trevor Parscal efafed3231 Remove ve.{inheritClass,mixinClass} and use OO instead
Change-Id: I8df9226a358a76b661eab6e967ff0d63d361f691
2013-10-18 18:58:08 +02:00

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 ve.Factory
* @constructor
*/
ve.ce.AnnotationFactory = function VeCeAnnotationFactory() {
// Parent constructor
ve.Factory.call( this );
};
/* Inheritance */
OO.inheritClass( ve.ce.AnnotationFactory, ve.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();