Parcourir la source

Simplify view property in `EditorUI`.

Krzysztof Krztoń il y a 7 ans
Parent
commit
61609513af
1 fichiers modifiés avec 4 ajouts et 14 suppressions
  1. 4 14
      packages/ckeditor5-editor-decoupled/src/decouplededitorui.js

+ 4 - 14
packages/ckeditor5-editor-decoupled/src/decouplededitorui.js

@@ -29,10 +29,10 @@ export default class DecoupledEditorUI 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.
@@ -43,16 +43,6 @@ export default class DecoupledEditorUI extends EditorUI {
 		this._toolbarConfig = normalizeToolbarConfig( editor.config.get( 'toolbar' ) );
 	}
 
-	/**
-	 * The main (top–most) view of the editor UI.
-	 *
-	 * @readonly
-	 * @member {module:ui/editorui/editoruiview~EditorUIView} #view
-	 */
-	get view() {
-		return this._view;
-	}
-
 	/**
 	 * Initializes the UI.
 	 */
@@ -89,7 +79,7 @@ export default class DecoupledEditorUI extends EditorUI {
 	 * @inheritDoc
 	 */
 	destroy() {
-		this._view.destroy();
+		this.view.destroy();
 
 		super.destroy();
 	}