Kaynağa Gözat

Minor corrections.

Piotrek Koszuliński 10 yıl önce
ebeveyn
işleme
1d639af141

+ 3 - 3
packages/ckeditor5-engine/src/ui/template.js

@@ -186,7 +186,7 @@ export default class Template {
 	 */
 	_renderElementChildren( def, el, isApply ) {
 		if ( def.children ) {
-			def.children.map( ( childDef, index ) => {
+			def.children.forEach( ( childDef, index ) => {
 				if ( isApply ) {
 					this._renderNode( childDef, el.childNodes[ index ] );
 				} else {
@@ -231,7 +231,7 @@ export default class Template {
  * Returns a function which, when called in the context of HTMLElement,
  * it replaces element children with a text node of given value.
  *
- * @protected
+ * @private
  * @param {Function}
  */
 function getTextUpdater() {
@@ -242,7 +242,7 @@ function getTextUpdater() {
  * Returns a function which, when called in the context of HTMLElement,
  * it updates element's attribute with given value.
  *
- * @protected
+ * @private
  * @param {String} attr A name of the attribute to be updated.
  * @param {Function}
  */

+ 15 - 14
packages/ckeditor5-engine/src/ui/view.js

@@ -268,9 +268,10 @@ export default class View {
 
 	/**
 	 * Destroys the view instance. The process includes:
-	 *  1. Removal of child views from {@link #regions}.
-	 *  2. Destruction of the {@link #regions}.
-	 *  3. Removal of {#link #_el} from DOM.
+	 *
+	 * 1. Removal of child views from {@link #regions}.
+	 * 2. Destruction of the {@link #regions}.
+	 * 3. Removal of {#link #_el} from DOM.
 	 */
 	destroy() {
 		let childView;
@@ -334,20 +335,20 @@ export default class View {
 		 * Note: If the selector is supplied, it narrows the scope to relevant targets only.
 		 * So instead of
 		 *
-		 *     children: [
-		 *         { tag: 'span', on: { click: 'foo' } }
-		 *         { tag: 'span', on: { click: 'foo' } }
-		 *     ]
+		 *		children: [
+		 *			{ tag: 'span', on: { click: 'foo' } }
+		 *			{ tag: 'span', on: { click: 'foo' } }
+		 *		]
 		 *
 		 * a single, more efficient listener can be attached that uses **event delegation**:
 		 *
-		 *     children: [
-		 *         { tag: 'span' }
-		 *         { tag: 'span' }
-		 *     ],
-		 *     on: {
-		 *         'click@span': 'foo',
-		 *     }
+		 *		children: [
+		 *			{ tag: 'span' }
+		 *			{ tag: 'span' }
+		 *		],
+		 *		on: {
+		 *			'click@span': 'foo',
+		 *		}
 		 *
 		 * @param {HTMLElement} el Element, to which the native DOM Event listener is attached.
 		 * @param {String} domEventName The name of native DOM Event.