ComposerState
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
The dynamic component being shown inside the composer. |
|
public |
A reference to the text editor that allows text manipulation. |
|
public |
fields: {"content": *} |
|
public |
height: Integer The composer's intended height, which can be modified by the user (by dragging the composer handle). |
|
public |
onExit: * |
|
public |
position: ComposerState.Position The composer's current position. |
Method Summary
Public Methods | ||
public |
bodyMatches(type: object, data: object): boolean Determine whether the body matches the given component class and data. |
|
public |
clear() Clear the composer's content component. |
|
public |
close() Confirm with the user so they don't lose their content, then close the composer. |
|
public |
composingReplyTo(discussion: Discussion): Boolean Check whether or not the user is currently composing a reply to a discussion. |
|
public |
computedHeight(): Integer | String Computed the composer's current height, based on the intended height, and the composer's current state. |
|
public |
Exit fullscreen mode. |
|
public |
Take the composer into fullscreen mode. |
|
public |
hide() Close the composer. |
|
public |
Determine whether or not the Composer is covering the screen. |
|
public |
Determine whether or not the Composer is visible. |
|
public |
load(componentClass: ComposerBody) Load a content component into the composer. |
|
public |
maximumHeight(): Integer Maxmimum height of the Composer. |
|
public |
minimize() Minimize the composer. |
|
public |
minimumHeight(): Integer Minimum height of the Composer. |
|
public |
preventClosingWhen(callback: Function, message: String) Configure when / what to ask the user before closing the composer. |
|
public |
Confirm with the user that they want to close the composer and lose their content. |
|
public |
show() Show the composer. |
Public Constructors
public constructor() source
Public Members
public editor: EditorDriverInterface | null source
A reference to the text editor that allows text manipulation.
public fields: {"content": *} source
public height: Integer source
The composer's intended height, which can be modified by the user (by dragging the composer handle).
public onExit: * source
Public Methods
public bodyMatches(type: object, data: object): boolean source
Determine whether the body matches the given component class and data.
public close() source
Confirm with the user so they don't lose their content, then close the composer.
public composingReplyTo(discussion: Discussion): Boolean source
Check whether or not the user is currently composing a reply to a discussion.
Params:
Name | Type | Attribute | Description |
discussion | Discussion |
public computedHeight(): Integer | String source
Computed the composer's current height, based on the intended height, and the composer's current state. This will be applied to the composer's content's DOM element.
public fullScreen() source
Take the composer into fullscreen mode. Has no effect if the composer is hidden.
public isFullScreen(): Boolean source
Determine whether or not the Composer is covering the screen.
This will be true if the Composer is in full-screen mode on desktop, or if we are on a mobile device, where we always consider the composer as full-screen..
public isVisible(): boolean source
Determine whether or not the Composer is visible.
True when the composer is displayed on the screen and has a body component. It could be open in "normal" or full-screen mode, or even minimized.
public load(componentClass: ComposerBody) source
Load a content component into the composer.
Params:
Name | Type | Attribute | Description |
componentClass | ComposerBody |
public preventClosingWhen(callback: Function, message: String) source
Configure when / what to ask the user before closing the composer.
The provided callback will be used to determine whether asking for confirmation is necessary. If the callback returns true at the time of closing, the provided text will be shown in a standard confirmation dialog.