瀏覽代碼

Docs: updated module paths in docs.

Szymon Cofalik 9 年之前
父節點
當前提交
5d05a22af5

+ 3 - 3
packages/ckeditor5-engine/src/conversion/buildmodelconverter.js

@@ -56,9 +56,9 @@ import CKEditorError from '../../utils/ckeditorerror.js';
  *		buildModelConverter().for( dispatcher ).fromAttribute( 'bold' ).toElement( 'strong' );
  *
  * 4. Model marker to view element converter. This is a converter that converts markers from given group to view attribute element.
- * Markers, basically, are {@link engine.model.LiveRange} instances, that are named. In this conversion, model range is
+ * Markers, basically, are {@link module:engine/model/liverange~LiveRange} instances, that are named. In this conversion, model range is
  * converted to view range, then that view range is wrapped (or unwrapped, if range is removed) in a view attribute element.
- * To learn more about markers, see {@link engine.model.MarkersCollection}.
+ * To learn more about markers, see {@link module:engine/model/markerscollection~MarkersCollection}.
  *
  *		const viewSpanSearchResult = new ViewAttributeElement( 'span', { class: 'search-result' } );
  *		buildModelConverter().for( dispatcher ).fromMarker( 'searchResult' ).toElement( viewSpanSearchResult );
@@ -153,7 +153,7 @@ class ModelConverterBuilder {
 	 *
 	 * @chainable
 	 * @param {String} markerName Name of marker to convert.
-	 * @returns {engine.conversion.ModelConverterBuilder}
+	 * @returns {module:engine/conversion/modelconverterbuilder~ModelConverterBuilder}
 	 */
 	fromMarker( markerName ) {
 		this._from = {

+ 4 - 4
packages/ckeditor5-engine/src/conversion/mapper.js

@@ -170,8 +170,8 @@ export default class Mapper {
 	 * Maps model position to view position using default mapper algorithm.
 	 *
 	 * @private
-	 * @param {engine.model.Position} modelPosition
-	 * @returns {engine.view.Position} View position mapped from model position.
+	 * @param {module:engine/model/position~Position} modelPosition
+	 * @returns {module:engine/view/position~Position} View position mapped from model position.
 	 */
 	_defaultToViewPosition( modelPosition ) {
 		let viewContainer = this._modelToViewMapping.get( modelPosition.parent );
@@ -202,8 +202,8 @@ export default class Mapper {
 	 * Maps view position to model position using default mapper algorithm.
 	 *
 	 * @private
-	 * @param {engine.view.Position} viewPosition
-	 * @returns {engine.model.Position} Model position mapped from view position.
+	 * @param {module:engine/view/position~Position} viewPosition
+	 * @returns {module:engine/model/position~Position} Model position mapped from view position.
 	 */
 	_defaultToModelPosition( viewPosition ) {
 		let viewBlock = viewPosition.parent;

+ 19 - 18
packages/ckeditor5-engine/src/conversion/model-to-view-converters.js

@@ -281,18 +281,18 @@ export function unwrapItem( elementCreator ) {
  *			|-  b}                                        |   |- ab
  *			|-  c                                         |- c
  *
- * The wrapping node depends on passed parameter. If {@link engine.view.AttributeElement} was passed, it will be cloned and
- * the copy will become the wrapping element. If `Function` is provided, it is passed all the parameters of the
- * {@link engine.conversion.ModelConversionDispatcher#event:addMarker addMarker event}. It's expected that the
- * function returns a {@link engine.view.AttributeElement}. The result of the function will be the wrapping element.
- * When provided `Function` does not return element, then will be no conversion.
+ * The wrapping node depends on passed parameter. If {@link module:engine/view/attributeelement~AttributeElement} was passed, it
+ * will be cloned and the copy will become the wrapping element. If `Function` is provided, it is passed all the parameters of the
+ * {@link module:engine/conversion/modelconversiondispatcher~ModelConversionDispatcher#event:addMarker addMarker event}. It's expected
+ * that the function returns a {@link module:engine/view/attributeelement~AttributeElement}. The result of the function will be the
+ * wrapping element. When provided `Function` does not return element, then will be no conversion.
  *
  * The converter automatically consumes corresponding value from consumables list, stops the event (see
- * {@link engine.conversion.ModelConversionDispatcher}).
+ * {@link module:engine/conversion/modelconversiondispatcher~ModelConversionDispatcher}).
  *
  *		modelDispatcher.on( 'addMarker:searchResult', wrapRange( new ViewAttributeElement( 'span', { class: 'searchResult' } ) ) );
  *
- * @param {engine.view.AttributeElement|Function} elementCreator View attribute element, or function returning
+ * @param {module:engine/view/attributeelement~AttributeElement|Function} elementCreator View attribute element, or function returning
  * a view attribute element, which will be used for wrapping.
  * @returns {Function} Wrap range converter.
  */
@@ -326,19 +326,20 @@ export function wrapRange( elementCreator ) {
  * Function factory, creates a converter that converts removing of a model marker to view attribute element.
  * This converter will unwrap view nodes from corresponding view range.
  *
- * The view element that will be unwrapped depends on passed parameter. If {@link engine.view.AttributeElement} was passed,
- * it will be used to look for similar element in the view for unwrapping. If `Function` is provided, it is passed all
- * the parameters of the {@link engine.conversion.ModelConversionDispatcher#event:removeMarker removeMarker event}. It's
- * expected that the function returns a {@link engine.view.AttributeElement}. The result of the function will be used to
- * look for similar element in the view for unwrapping.
+ * The view element that will be unwrapped depends on passed parameter. If {@link module:engine/view/attributeelement~AttributeElement}
+ * was passed, it will be used to look for similar element in the view for unwrapping. If `Function` is provided, it is passed all
+ * the parameters of the
+ * {@link module:engine/conversion/modelconversiondispatcher~ModelConversionDispatcher#event:removeMarker removeMarker event}.
+ * It's expected that the function returns a {@link module:/engine/view/attributeelement~AttributeElement}. The result of
+ * the function will be used to look for similar element in the view for unwrapping.
  *
  * The converter automatically consumes corresponding value from consumables list, stops the event (see
- * {@link engine.conversion.ModelConversionDispatcher}) and bind model and view elements.
+ * {@link module:engine/conversion/modelconversiondispatcher~ModelConversionDispatcher}) and bind model and view elements.
  *
  *		modelDispatcher.on( 'removeMarker:searchResult', unwrapRange( new ViewAttributeElement( 'span', { class: 'searchResult' } ) ) );
  *
- * @see engine.conversion.modelToView.wrapRange
- * @param {engine.view.AttributeElement|Function} elementCreator View attribute element, or function returning
+ * @see module:engine/conversion/model-to-view-converters~wrapRange
+ * @param {module:engine/view/attributeelement~AttributeElement|Function} elementCreator View attribute element, or function returning
  * a view attribute element, which will be used for unwrapping.
  * @returns {Function} Unwrap range converter.
  */
@@ -376,9 +377,9 @@ export function unwrapRange( elementCreator ) {
 
 // Takes given `viewPosition` and returns a widest possible range that contains this position and all view elements
 // before that position and after that position which has zero length in model (in most cases empty `ViewAttributeElement`s).
-// @param {engine.view.Position} viewPosition Position to start from when looking for furthest zero length position.
-// @param {engine.conversion.Mapper} mapper Mapper to use when looking for furthest zero length position.
-// @returns {engine.view.Range}
+// @param {module:engine/view/position~Position} viewPosition Position to start from when looking for furthest zero length position.
+// @param {module:engine/conversion/mapper~Mapper} mapper Mapper to use when looking for furthest zero length position.
+// @returns {module:engine/view/range~Range}
 function enlargeViewPosition( viewPosition, mapper ) {
 	const start = ViewPosition.createFromPosition( viewPosition );
 	const end = ViewPosition.createFromPosition( viewPosition );

+ 1 - 1
packages/ckeditor5-engine/src/model/document.js

@@ -87,7 +87,7 @@ export default class Document {
 		 * Document's markers' collection.
 		 *
 		 * @readonly
-		 * @member {module:engine/model/markerscollection~MarkersCollection} engine.model.Document#markers
+		 * @member {module:engine/model/markerscollection~MarkersCollection}
 		 */
 		this.markers = new MarkersCollection();
 

+ 0 - 2
packages/ckeditor5-engine/src/model/markerscollection.js

@@ -32,8 +32,6 @@ import mix from '../../utils/mix.js';
  * a given node (i.e. a character is bold no matter if it gets moved or content around it changes). Markers on the
  * other hand are continuous ranges (i.e. if a character from inside of marker range is moved somewhere else, marker
  * range is shrunk and the character does not have any attribute or information that it was in the marked range).
- *
- * @memberOf engine.model
  */
 export default class MarkersCollection {
 	/**

+ 9 - 9
packages/ckeditor5-engine/src/model/range.js

@@ -372,8 +372,8 @@ export default class Range {
 	/**
 	 * Returns a range that is a result of transforming this range by given `delta`.
 	 *
-	 * @param {engine.model.Delta} delta Delta to transform range by.
-	 * @returns {Array.<engine.model.Range>} Range which is the result of transformation.
+	 * @param {module:engine/model/delta~Delta} delta Delta to transform range by.
+	 * @returns {Array.<module:engine/model/range~Range>} Range which is the result of transformation.
 	 */
 	getTransformedByDelta( delta ) {
 		let ranges = [ Range.createFromRange( this ) ];
@@ -406,10 +406,10 @@ export default class Range {
 	 *
 	 * @protected
 	 * @param {'insert'|'move'|'remove'|'reinsert'} type Change type.
-	 * @param {engine.model.Position} targetPosition Position before the first changed node.
+	 * @param {module:engine/model/position~Position} targetPosition Position before the first changed node.
 	 * @param {Number} howMany How many nodes has been changed.
-	 * @param {engine.model.Position} sourcePosition Source position of changes.
-	 * @returns {Array.<engine.model.Range>}
+	 * @param {module:engine/model/position~Position} sourcePosition Source position of changes.
+	 * @returns {Array.<module:engine/model/range~Range>}
 	 */
 	_getTransformedByDocumentChange( type, targetPosition, howMany, sourcePosition ) {
 		if ( type == 'insert' ) {
@@ -606,8 +606,8 @@ export default class Range {
 	 * Combines all ranges from the passed array into a one range. At least one range has to be passed.
 	 * Passed ranges must not have common parts.
 	 *
-	 * The first range from the array is a reference range. If other ranges {@link engine.model.Position.isTouching are touching}
-	 * the reference range, they will get combined into one range.
+	 * The first range from the array is a reference range. If other ranges
+	 * {@link module:engine/model/position~Position#isTouching are touching} the reference range, they will get combined into one range.
 	 *
 	 *		[  ][]  [    ][ ][  ref range  ][ ][]  [  ]  // Passed ranges, shown sorted. "Ref range" was the first range in original array.
 	 *		        [      returned range       ]  [  ]  // The combined range.
@@ -615,8 +615,8 @@ export default class Range {
 	 *	            [                           ]        // The result of the function if the third-to-seventh range was a reference range.
 	 *	                                           [  ]  // The result of the function if the last range was a reference range.
 	 *
-	 * @param {Array.<engine.model.Range>} ranges Ranges to combine.
-	 * @returns {engine.model.Range} Combined range.
+	 * @param {Array.<module:engine/model/range~Range>} ranges Ranges to combine.
+	 * @returns {module:engine/model/range~Range} Combined range.
 	 */
 	static createFromRanges( ranges ) {
 		if ( ranges.length === 0 ) {

+ 1 - 1
packages/ckeditor5-engine/src/view/element.js

@@ -111,7 +111,7 @@ export default class Element extends Node {
 		 * Custom properties can be added to element instance, will be cloned but not rendered into DOM.
 		 *
 		 * @protected
-		 * @memeber {Map} engine.view.Element#_customProperties.
+		 * @memeber {Map}
 		 */
 		this._customProperties = new Map();
 	}

+ 6 - 6
packages/ckeditor5-engine/src/view/writer.js

@@ -1142,19 +1142,19 @@ function isContainerOrFragment( node ) {
 	return node instanceof ContainerElement || node instanceof DocumentFragment;
 }
 
-// Checks if {@link engine.view.Range#start range start} and {@link engine.view.Range#end range end} are placed
-// inside same {@link engine.view.ContainerElement container}.
-// Throws {@link utils.CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.
+// Checks if {@link module:engine/view/range~Range#start range start} and {@link module:engine/view/range~Range#end range end} are placed
+// inside same {@link module:engine/view/containerelement~ContainerElement container element}.
+// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.
 //
-// @param {engine.view.Range} range
+// @param {module:engine/view/range~Range} range
 function validateRangeContainer( range ) {
 	const startContainer = getParentContainer( range.start );
 	const endContainer = getParentContainer( range.end );
 
 	if ( !startContainer || !endContainer || startContainer !== endContainer ) {
 		/**
-		 * Range container is invalid. This can happen if {@link engine.view.Range#start range start} and
-		 * {@link engine.view.Range#end range end} positions are not placed inside same container or
+		 * Range container is invalid. This can happen if {@link module:engine/view/range~Range#start range start} and
+		 * {@link module:engine/view/range~Range#end range end} positions are not placed inside same container or
 		 * parent container for these positions cannot be found.
 		 *
 		 * @error view-writer-invalid-range-container