浏览代码

Fixed API docs - data model incorrect usage.

Maciej Bukowski 7 年之前
父节点
当前提交
4175df1fa1

+ 4 - 4
packages/ckeditor5-engine/src/model/differ.js

@@ -189,7 +189,7 @@ export default class Differ {
 	 * @param {module:engine/model/range~Range|null} oldRange Marker range before the change or `null` if the marker has just
 	 * been created.
 	 * @param {module:engine/model/range~Range|null} newRange Marker range after the change or `null` if the marker was removed.
-	 * @param {Boolean} affectsData Flag indicating whether marker affects the data model.
+	 * @param {Boolean} affectsData Flag indicating whether marker affects the editor data.
 	 */
 	bufferMarkerChange( markerName, oldRange, newRange, affectsData ) {
 		const buffered = this._changedMarkers.get( markerName );
@@ -247,9 +247,9 @@ export default class Differ {
 	}
 
 	/**
-	 * Checks whether some of buffered marker affects the data model or whether some element changed.
+	 * Checks whether some of buffered marker affects the editor data or whether some element changed.
 	 *
-	 * @returns {Boolean} `true` if buffered markers or changes in elements affects the data model.
+	 * @returns {Boolean} `true` if buffered markers or changes in elements affects the editor data.
 	 */
 	hasDataChanges() {
 		for ( const [ , change ] of this._changedMarkers ) {
@@ -258,7 +258,7 @@ export default class Differ {
 			}
 		}
 
-		// If markers do not affect the data model, check whether there are some changes in elements.
+		// If markers do not affect the data, check whether there are some changes in elements.
 		return this._changesInElement.size > 0;
 	}
 

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

@@ -147,7 +147,7 @@ export default class Document {
 		// Wait for `_change` event from model, which signalizes that outermost change block has finished.
 		// When this happens, check if there were any changes done on document, and if so, call post fixers,
 		// fire `change` event for features and conversion and then reset the differ.
-		// Fire `change:data` event when at least one operation or buffered marker changes the data model.
+		// Fire `change:data` event when at least one operation or buffered marker changes the data.
 		this.listenTo( model, '_change', ( evt, writer ) => {
 			if ( !this.differ.isEmpty || hasSelectionChanged ) {
 				this._callPostFixers( writer );

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

@@ -374,7 +374,7 @@ class Marker {
 	}
 
 	/**
-	 * A value indicating if the marker changes the data model.
+	 * A value indicating if the marker changes the data.
 	 *
 	 * @returns {Boolean}
 	 */

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

@@ -807,9 +807,9 @@ export default class Writer {
 	 *
 	 *		addMarker( markerName, { range, usingOperation: true } );
 	 *
-	 * Create marker that does not affects the data model:
+	 * Create marker that affects the editor data:
 	 *
-	 *		addMarker( markerName, { range, usingOperation: false, affectData: false } );
+	 *		addMarker( markerName, { range, usingOperation: false, affectData: true } );
 	 *
 	 * Note: For efficiency reasons, it's best to create and keep as little markers as possible.
 	 *
@@ -819,7 +819,7 @@ export default class Writer {
 	 * @param {Boolean} options.usingOperation Flag indicating that the marker should be added by MarkerOperation.
 	 * See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.
 	 * @param {module:engine/model/range~Range} options.range Marker range.
-	 * @param {Boolean} [options.affectsData=false] Flag indicating that the marker changes the data model.
+	 * @param {Boolean} [options.affectsData=false] Flag indicating that the marker changes the editor data.
 	 * @returns {module:engine/model/markercollection~Marker} Marker that was set.
 	 */
 	addMarker( name, options ) {
@@ -879,7 +879,7 @@ export default class Writer {
 	 * {@link module:engine/model/markercollection~Marker marker class description} to learn about the difference between
 	 * markers managed by operations and not-managed by operations. It is possible to change this option for an existing marker.
 	 *
-	 * The `options.affectData` parameter allows you to inform the engine, that this marker affects the data model.
+	 * The `options.affectData` parameter allows you to inform the engine, that this marker affects the editor data.
 	 * It impacts the performance, because changes in markers with set `options.affectData:false` do not cause firing the
 	 * {@link module:engine/model/document~Document#event:change:data `change:data`} event.
 	 *
@@ -896,7 +896,7 @@ export default class Writer {
 	 *
 	 *		updateMarker( marker, { usingOperation: true } );
 	 *
-	 * Change marker's option (inform the engine, that the marker does not affect the data model anymore):
+	 * Change marker's option (inform the engine, that the marker does not affect the data anymore):
 	 *
 	 *		updateMarker( markerName, { affectData: false } );
 	 *
@@ -906,7 +906,7 @@ export default class Writer {
 	 * @param {module:engine/model/range~Range} [options.range] Marker range to update.
 	 * @param {Boolean} [options.usingOperation] Flag indicated whether the marker should be added by MarkerOperation.
 	 * See {@link module:engine/model/markercollection~Marker#managedUsingOperations}.
-	 * @param {Boolean} [options.affectsData] Flag indicating that the marker changes the data model.
+	 * @param {Boolean} [options.affectsData] Flag indicating that the marker changes the editor data.
 	 */
 	updateMarker( markerOrName, options = {} ) {
 		this._assertWriterUsedCorrectly();