Jelajahi Sumber

API docs. Also, it's unnecessary to mix EmitterMixin if ObservableMixin is mixed, as ObservableMixin implements Emitter.

Piotrek Koszuliński 9 tahun lalu
induk
melakukan
b6248e4379

+ 2 - 2
packages/ckeditor5-engine/src/command/attributecommand.js

@@ -146,9 +146,9 @@ export default class AttributeCommand extends Command {
 	 * Walks through given array of ranges and removes parts of them that are not allowed by schema to have the
 	 * Walks through given array of ranges and removes parts of them that are not allowed by schema to have the
 	 * attribute set. This is done by breaking a range in two and omitting the not allowed part.
 	 * attribute set. This is done by breaking a range in two and omitting the not allowed part.
 	 *
 	 *
-	 * @param {Array.<core.treeModel.Range>} ranges Ranges to be validated.
-	 * @returns {Array} Ranges without invalid parts.
 	 * @private
 	 * @private
+	 * @param {Array.<core.treeModel.Range>} ranges Ranges to be validated.
+	 * @returns {Array.<core.treeModel.Range>} Ranges without invalid parts.
 	 */
 	 */
 	_getSchemaValidRanges( ranges ) {
 	_getSchemaValidRanges( ranges ) {
 		const validRanges = [];
 		const validRanges = [];

+ 5 - 6
packages/ckeditor5-engine/src/command/command.js

@@ -6,7 +6,6 @@
 'use strict';
 'use strict';
 
 
 import ObservableMixin from '../../utils/observablemixin.js';
 import ObservableMixin from '../../utils/observablemixin.js';
-import EmitterMixin from '../../utils/emittermixin.js';
 import utils from '../../utils/utils.js';
 import utils from '../../utils/utils.js';
 
 
 /**
 /**
@@ -19,9 +18,8 @@ import utils from '../../utils/utils.js';
  *
  *
  * This is an abstract base class for all commands.
  * This is an abstract base class for all commands.
  *
  *
- * @mixes utils.ObservableMixin
- * @mixes utils.EmitterMixin
  * @memberOf core.command
  * @memberOf core.command
+ * @mixes utils.ObservableMixin
  */
  */
 export default class Command {
 export default class Command {
 	/**
 	/**
@@ -127,12 +125,13 @@ function disableCallback( evt, data ) {
 }
 }
 
 
 utils.mix( Command, ObservableMixin );
 utils.mix( Command, ObservableMixin );
-utils.mix( Command, EmitterMixin );
 
 
 /**
 /**
- * Fired whenever command has to have it's {@link core.command.Command#isEnabled} property refreshed. Every feature,
- * command or other class which should be able to disable command (set `isEnabled` to `false`) should listen to this
+ * Fired whenever command has to have its {@link core.command.Command#isEnabled} property refreshed. Every feature,
+ * command or other class which needs to disable command (set `isEnabled` to `false`) should listen to this
  * event.
  * event.
  *
  *
  * @event core.command.Command#refreshState
  * @event core.command.Command#refreshState
+ * @param {Object} data
+ * @param {Boolean} [data.isEnabled=true]
  */
  */