Explorar el Código

Move private methods to the end of class definition.

Mateusz Samsel hace 6 años
padre
commit
e55b247386
Se han modificado 1 ficheros con 29 adiciones y 29 borrados
  1. 29 29
      packages/ckeditor5-font/src/ui/colortableview.js

+ 29 - 29
packages/ckeditor5-font/src/ui/colortableview.js

@@ -159,6 +159,35 @@ export default class ColorTableView extends View {
 	}
 
 	/**
+	 * @inheritDoc
+	 */
+	render() {
+		super.render();
+
+		// Items added before rendering should be known to the #focusTracker.
+		for ( const item of this.items ) {
+			this.focusTracker.add( item.element );
+		}
+
+		// Start listening for the keystrokes coming from #element.
+		this.keystrokes.listenTo( this.element );
+	}
+
+	/**
+	 * Focuses the first focusable element in {@link #items}.
+	 */
+	focus() {
+		this._focusCycler.focusFirst();
+	}
+
+	/**
+	 * Focuses the last focusable element in {@link #items}.
+	 */
+	focusLast() {
+		this._focusCycler.focusLast();
+	}
+
+	/**
 	 * Adds the remove color button as a child of the current view.
 	 *
 	 * @private
@@ -253,33 +282,4 @@ export default class ColorTableView extends View {
 
 		return documentColors;
 	}
-
-	/**
-	 * @inheritDoc
-	 */
-	render() {
-		super.render();
-
-		// Items added before rendering should be known to the #focusTracker.
-		for ( const item of this.items ) {
-			this.focusTracker.add( item.element );
-		}
-
-		// Start listening for the keystrokes coming from #element.
-		this.keystrokes.listenTo( this.element );
-	}
-
-	/**
-	 * Focuses the first focusable element in {@link #items}.
-	 */
-	focus() {
-		this._focusCycler.focusFirst();
-	}
-
-	/**
-	 * Focuses the last focusable element in {@link #items}.
-	 */
-	focusLast() {
-		this._focusCycler.focusLast();
-	}
 }