Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Docs: Improvements in the EditorUI class.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Jun 27, 2018
1 parent 27b6bb6 commit a596cfa
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/editor/editorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import mix from '@ckeditor/ckeditor5-utils/src/mix';
import throttle from '@ckeditor/ckeditor5-utils/src/lib/lodash/throttle';

/**
* Class providing the minimal interface that is required to successfully bootstrap any editor UI.
* A class providing the minimal interface that is required to successfully bootstrap any editor UI.
*
* @mixes module:utils/emittermixin~EmitterMixin
*/
Expand All @@ -28,7 +28,7 @@ export default class EditorUI {
*/
constructor( editor, view ) {
/**
* Editor that the UI belongs to.
* The editor that the UI belongs to.
*
* @readonly
* @member {module:core/editor/editor~Editor} #editor
Expand All @@ -44,7 +44,7 @@ export default class EditorUI {
this.view = view;

/**
* Instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins
* An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins
* to register factories of specific UI components.
*
* @readonly
Expand All @@ -53,8 +53,8 @@ export default class EditorUI {
this.componentFactory = new ComponentFactory( editor );

/**
* Keeps information about editor UI focus and propagates it among various plugins and components,
* unifying them in a uniform focus group.
* Stores the information about the editor UI focus and propagates it so various plugins and components
* are unified as a focus group.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker} #focusTracker
Expand All @@ -74,7 +74,7 @@ export default class EditorUI {
}

/**
* Fires the UI update.
* Fires the (throttled) {@link module:core/editor/editorui~EditorUI#event:update} event.
*/
update() {
this._throttledUpdate();
Expand All @@ -90,10 +90,13 @@ export default class EditorUI {
}

/**
* Fired whenever UI and all related components should be refreshed.
* Fired whenever the UI (all related components) should be refreshed.
*
* It is fired after each {@link module:engine/view/document~Document#event:layoutChanged} event
* besides it can be fired manually through {@link module:core/editor/editorui~EditorUI#update} method.
* **Note:**: The event is fired after each {@link module:engine/view/document~Document#event:layoutChanged}.
* It can also be fired manually via the {@link module:core/editor/editorui~EditorUI#update} method.
*
* **Note:**: This event is not fired immediately but throttled to improve the performance of the UI

This comment has been minimized.

Copy link
@oskarwrobel

oskarwrobel Jun 27, 2018

Contributor

This is not exactly true. This event is fired immediately when is fired for the first time but the frequency of this event is reduced by the throttle function.

* and the overall responsiveness of the editor.
*
* @event update
*/
Expand Down

0 comments on commit a596cfa

Please sign in to comment.