Constructor
new Properties(container, selection, controller)
Initialize a new properties view.
Parameters:
Name | Type | Description |
---|---|---|
container |
HTMLElement | The HTML element that will contain this preview area. |
selection |
module:model/Selection.Selection | |
controller |
module:Controller.Controller | The controller that manages the current editor. |
- Source:
Extends
Members
container :HTMLElement
The HTML element that will contain this preview area.
Type:
- HTMLElement
- Overrides:
- Source:
controller :module:Controller.Controller
The controller that manages the current editor.
Type:
- Overrides:
- Source:
(readonly) exportListHelp :string
The HTML of the help message for include/exclude lists in export.
Type:
- string
- Source:
mode :string
What the properties view shows.
Acceptable values are: "default"
, "preferences"
and "export"
.
Type:
- string
- Default Value:
- default
- Source:
selection :module:model/Selection.Selection
The object that manages the frame and layer selection.
Type:
- Source:
state :object
Form field values that need to be set after rendering.
Type:
- object
- Overrides:
- Source:
Methods
render() → {VNode}
Render this view as a virtual DOM tree.
- Overrides:
- Source:
Returns:
- A virtual DOM tree for this view.
- Type
- VNode
renderExportTool() → {VNode}
Render the properties view with the export tool.
- Source:
Returns:
- A virtual DOM tree.
- Type
- VNode
renderHelp(text, onclick) → {VNode}
Create a help widget.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The tooltip text to show. |
onclick |
function | An event handler for click events. |
- Source:
Returns:
- A virtual DOM tree.
- Type
- VNode
renderNumberField(property, disabled, getter, setter, signed, step, factor) → {VNode}
Create a number input field.
Parameters:
Name | Type | Description |
---|---|---|
property |
string | The name of a property of the model. |
disabled |
boolean | Is this field disabled? |
getter |
function | A function that returns the current value of the property in the model. |
setter |
function | A function that updates the value of the property in the model. |
signed |
boolean | Does this field acccept negative values? |
step |
number | The step between consecutive values. |
factor |
number | A conversion factor between field value and model property value. |
- Source:
Returns:
- A virtuel DOM tree.
- Type
- VNode
renderPDFExportFields() → {Array.<VNode>}
Render the fields of the PDF export tool.
- Source:
Returns:
- Virtual DOM nodes with the PDF-specific fields of the export tool.
- Type
- Array.<VNode>
renderPPTXExportFields() → {Array.<VNode>}
Render the fields of the PPTX export tool.
- Source:
Returns:
- Virtual DOM nodes with the PPTX-specific fields of the export tool.
- Type
- Array.<VNode>
renderPreferences() → {VNode}
Render the properties view to edit the editor preferences.
- Source:
Returns:
- A virtual DOM tree.
- Type
- VNode
renderPresentationProperties() → {VNode}
Render the properties view to edit the presentation properties.
- Source:
Returns:
- A virtual DOM tree.
- Type
- VNode
renderRangeField(property, disabled, getter, setter, min, max, step) → {VNode}
Create a range input field.
Parameters:
Name | Type | Description |
---|---|---|
property |
string | The name of a property of the model. |
disabled |
boolean | Is this field disabled? |
getter |
function | A function that returns the current value of the property in the model. |
setter |
function | A function that updates the value of the property in the model. |
min |
number | The minimum supported value. |
max |
number | The maximum supported value. |
step |
number | The step between consecutive values. |
- Source:
Returns:
- A virtuel DOM tree.
- Type
- VNode
renderRichTextField(property, disabled, getter, setter, acceptsEmpty) → {VNode}
Create a rich text input field.
A rich text field will render as a content-editable HTML element supporting basic formatting via keyboard shortcuts.
Parameters:
Name | Type | Description |
---|---|---|
property |
string | The name of a property of the model. |
disabled |
boolean | Is this field disabled? |
getter |
function | A function that returns the current value of the property in the model. |
setter |
function | A function that updates the value of the property in the model. |
acceptsEmpty |
boolean | Is an empty field a valid entry? |
- Source:
Returns:
- A virtuel DOM tree.
- Type
- VNode
renderSelectField(property, getter, setter, options) → {VNode}
Create a drop-down list.
Parameters:
Name | Type | Description |
---|---|---|
property |
string | The name of a property of the model. |
getter |
function | A function that returns the current value of the property in the model. |
setter |
function | A function that updates the value of the property in the model. |
options |
object | An object that maps option keys to option labels. |
- Source:
Returns:
- A virtuel DOM tree.
- Type
- VNode
renderTextField(property, disabled, getter, setter, acceptsEmpty) → {VNode}
Create a text input field.
A text field will render as a simple HTML input element.
Parameters:
Name | Type | Description |
---|---|---|
property |
string | The name of a property of the model. |
disabled |
boolean | Is this field disabled? |
getter |
function | A function that returns the current value of the property in the model. |
setter |
function | A function that updates the value of the property in the model. |
acceptsEmpty |
boolean | Is an empty field a valid entry? |
- Source:
Returns:
- A virtuel DOM tree.
- Type
- VNode
renderToggleField(label, title, property, getter, setter) → {VNode}
Create a toggle button.
Parameters:
Name | Type | Description |
---|---|---|
label |
string | The label to show next to the button. |
title |
string | A tooltip for the button. |
property |
string | The name of a property of the model. |
getter |
function | A function that returns the current value of the property in the model. |
setter |
function | A function that updates the value of the property in the model. |
- Source:
Returns:
- A virtuel DOM tree.
- Type
- VNode
renderVideoExportFields() → {Array.<VNode>}
Render the fields of the video export tool.
- Source:
Returns:
- Virtual DOM nodes with the video-specific fields of the export tool.
- Type
- Array.<VNode>
repaint()
Repaint this view.
This will render the current view using the result of render
.
- Overrides:
- Source:
Listens to Events:
- event:resize
- module:Controller.event:repaint
toggleMode(mode)
Toggle between presentation properties and preferences or export mode.
Parameters:
Name | Type | Description |
---|---|---|
mode |
string | The mode to toggle ( |
- Source: