Sfoglia il codice sorgente

Simplify view property in `EditorUI`.

Krzysztof Krztoń 6 anni fa
parent
commit
c45a632804
1 ha cambiato i file con 4 aggiunte e 14 eliminazioni
  1. 4 14
      packages/ckeditor5-editor-classic/src/classiceditorui.js

+ 4 - 14
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -30,10 +30,10 @@ export default class ClassicEditorUI extends EditorUI {
 		/**
 		 * The main (top–most) view of the editor UI.
 		 *
-		 * @private
-		 * @member {module:ui/editorui/editoruiview~EditorUIView} #_view
+		 * @readonly
+		 * @member {module:ui/editorui/editoruiview~EditorUIView} #view
 		 */
-		this._view = view;
+		this.view = view;
 
 		/**
 		 * A normalized `config.toolbar` object.
@@ -53,16 +53,6 @@ export default class ClassicEditorUI extends EditorUI {
 	}
 
 	/**
-	 * The main (top–most) view of the editor UI.
-	 *
-	 * @readonly
-	 * @member {module:ui/editorui/editoruiview~EditorUIView} #view
-	 */
-	get view() {
-		return this._view;
-	}
-
-	/**
 	 * @inheritDoc
 	 */
 	get element() {
@@ -120,7 +110,7 @@ export default class ClassicEditorUI extends EditorUI {
 	destroy() {
 		this._elementReplacer.restore();
 
-		this._view.destroy();
+		this.view.destroy();
 
 		super.destroy();
 	}