Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Docs and other improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Mar 3, 2020
1 parent 13dd24c commit 16301a1
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/controller/datacontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class DataController {
* Creates a data controller instance.
*
* @param {module:engine/model/model~Model} model Data model.
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor Styles processor.
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance..
*/
constructor( model, stylesProcessor ) {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/controller/editingcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class EditingController {
* Creates an editing controller instance.
*
* @param {module:engine/model/model~Model} model Editing model.
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor Styles processor.
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance..
*/
constructor( model, stylesProcessor ) {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/view/attributeelement.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class AttributeElement extends Element {
* @see module:engine/view/downcastwriter~DowncastWriter#createAttributeElement
* @see module:engine/view/element~Element
* @protected
* @param {module:engine/view/document~Document} document A document where the element belongs to.
* @param {module:engine/view/document~Document} document The document instance to which this element belongs.
* @param {String} name Node name.
* @param {Object|Iterable} [attrs] Collection of attributes.
* @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]
Expand Down
2 changes: 1 addition & 1 deletion src/view/containerelement.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class ContainerElement extends Element {
* @see module:engine/view/downcastwriter~DowncastWriter#createContainerElement
* @see module:engine/view/element~Element
* @protected
* @param {module:engine/view/document~Document} document A document where the element belongs to.
* @param {module:engine/view/document~Document} document The document instance to which this element belongs.
* @param {String} name Node name.
* @param {Object|Iterable} [attrs] Collection of attributes.
* @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]
Expand Down
4 changes: 2 additions & 2 deletions src/view/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class Document {
/**
* Creates a Document instance.
*
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor Styles processor.
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance..
*/
constructor( stylesProcessor ) {
/**
Expand All @@ -49,7 +49,7 @@ export default class Document {
this.roots = new Collection( { idProperty: 'rootName' } );

/**
* StylesProcessor is responsible for writing and reading a normalized styles object.
* The styles processor instance used by this document when normalizing styles.
*
* @readonly
* @member {module:engine/view/stylesmap~StylesProcessor}
Expand Down
5 changes: 3 additions & 2 deletions src/view/documentfragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ export default class DocumentFragment {
* Creates new DocumentFragment instance.
*
* @protected
* @param {module:engine/view/document~Document} document A document where the document fragment belongs to.
* @param {module:engine/view/document~Document} document The document to which this document fragment belongs.
* @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]
* A list of nodes to be inserted into the created document fragment.
*/
constructor( document, children ) {
/**
* A document where the document fragment belongs to.
* The document to which this document fragment belongs.
*
* @readonly
* @member {module:engine/view/document~Document}
*/
this.document = document;
Expand Down
2 changes: 1 addition & 1 deletion src/view/domconverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class DomConverter {
/**
* Creates DOM converter.
*
* @param {module:engine/view/document~Document} document
* @param {module:engine/view/document~Document} document The view document instance.
* @param {Object} options Object with configuration options.
* @param {module:engine/view/filler~BlockFillerMode} [options.blockFillerMode='br'] The type of the block filler to use.
*/
Expand Down
8 changes: 5 additions & 3 deletions src/view/downcastwriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ import { isPlainObject } from 'lodash-es';
*/
export default class DowncastWriter {
/**
* @param {module:engine/view/document~Document} document
* @param {module:engine/view/document~Document} document The view document instance.
*/
constructor( document ) {
/**
* The view document instance in which this writer operates.
*
* @readonly
* @type {module:engine/view/document~Document}
*/
Expand Down Expand Up @@ -988,7 +990,7 @@ export default class DowncastWriter {
/**
* Creates a range spanning from `start` position to `end` position.
*
* **Note:** This factory method creates it's own {@link module:engine/view/position~Position} instances basing on passed values.
* **Note:** This factory method creates its own {@link module:engine/view/position~Position} instances basing on passed values.
*
* @param {module:engine/view/position~Position} start Start position.
* @param {module:engine/view/position~Position} [end] End position. If not set, range will be collapsed at `start` position.
Expand Down Expand Up @@ -1810,7 +1812,7 @@ function breakTextNode( position ) {
position.parent._data = position.parent.data.slice( 0, position.offset );

// Insert new text node after position's parent text node.
position.parent.parent._insertChild( position.parent.index + 1, new Text( position.parent.document, textToMove ) );
position.parent.parent._insertChild( position.parent.index + 1, new Text( position.root.document, textToMove ) );

// Return new position between two newly created text nodes.
return new Position( position.parent.parent, position.parent.index + 1 );
Expand Down
2 changes: 1 addition & 1 deletion src/view/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class Element extends Node {
* new Element( 'div', mapOfAttributes ); // map
*
* @protected
* @param {module:engine/view/document~Document} document A document where the element belongs to.
* @param {module:engine/view/document~Document} document The document instance to which this element belongs.
* @param {String} name Node name.
* @param {Object|Iterable} [attrs] Collection of attributes.
* @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]
Expand Down
2 changes: 1 addition & 1 deletion src/view/emptyelement.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class EmptyElement extends Element {
*
* @see module:engine/view/downcastwriter~DowncastWriter#createEmptyElement
* @protected
* @param {module:engine/view/document~Document} document A document where the element belongs to.
* @param {module:engine/view/document~Document} document The document instance to which this element belongs.
* @param {String} name Node name.
* @param {Object|Iterable} [attrs] Collection of attributes.
* @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]
Expand Down
1 change: 1 addition & 0 deletions src/view/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default class Node {
/**
* A document where the node belongs to.
*
* @readonly
* @member {module:engine/view/document~Document}
*/
this.document = document;
Expand Down
2 changes: 1 addition & 1 deletion src/view/rooteditableelement.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class RootEditableElement extends EditableElement {
/**
* Creates root editable element.
*
* @param {module:engine/view/document~Document} document A document where the element belongs to.
* @param {module:engine/view/document~Document} document The document instance to which this element belongs.
* @param {String} name Node name.
*/
constructor( document, name ) {
Expand Down
2 changes: 1 addition & 1 deletion src/view/uielement.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class UIElement extends Element {
*
* @see module:engine/view/downcastwriter~DowncastWriter#createUIElement
* @protected
* @param {module:engine/view/document~Document} document A document where the element belongs to.
* @param {module:engine/view/document~Document} document The document instance to which this element belongs.
* @param {String} name Node name.
* @param {Object|Iterable} [attributes] Collection of attributes.
* @param {module:engine/view/node~Node|Iterable.<module:engine/view/node~Node>} [children]
Expand Down
2 changes: 1 addition & 1 deletion src/view/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import env from '@ckeditor/ckeditor5-utils/src/env';
*/
export default class View {
/**
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor Styles processor.
* @param {module:engine/view/stylesmap~StylesProcessor} stylesProcessor The styles processor instance..
*/
constructor( stylesProcessor ) {
/**
Expand Down

0 comments on commit 16301a1

Please sign in to comment.