Constructor
new Preferences()
Initialize a preferences object with default values.
- Source:
Members
animateTransitions :boolean
Animate the transitions when moving from one frame to another in the editor.
Type:
- boolean
- Default Value:
- true
- Source:
enableNotifications :boolean
Enable notifications on file save and reload.
Type:
- boolean
- Default Value:
- true
- Source:
fontSize :number
The preferred font size, in points (pt).
Type:
- number
- Default Value:
- 11
- Source:
keys :object
The supported keyboard shortcuts.
A keyboard shortcut is represented as a key identifier,
optionally preceded by one or more modifiers ("Ctrl+"
, "Alt+"
, "Shift+"
).
Examples:
"A"
: the letter "A""ArrowLeft"
: the left arrow key."Ctrl+Shift+ArrowLeft"
: Ctrl, Shift, and the left arrow key simultaneously.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
autoselectOutlineElement |
string | Detect and select the outline element in the current frame and selected layers |
resetLayer |
string | Reset the selected layers to their default geometry |
addFrame |
string | Create a new frame |
save |
string | Save the presentation |
redo |
string | Execute the latest undone action |
undo |
string | Undo the latest action |
focusTitleField |
string | Give the focus to the "Frame title" field in the properties pane |
reload |
string | Reload the SVG document |
toggleFullscreen |
string | Enter or exit fullscreen mode |
toggleDevTools |
string | Open or close the developer tools |
- Source:
language :string
The preferred language of the user interface.
The value of this property should be a BCP 47 language tag
with an ISO 639-1 language code,
or "auto"
to let the editor use the system default language.
Type:
- string
- Default Value:
- auto
- Source:
reloadMode :string
When to reload an externally modified SVG document.
Supported values are:
"auto"
: reload immediately."onfocus"
: reload when the editor window gains the focus."manual"
: reload only on user request.
Type:
- string
- Default Value:
- auto
- Source:
saveMode :string
When to save an edited presentation.
Supported values are:
"onblur"
: save when the editor window loses focus."manual"
: save only on user request.
Type:
- string
- Default Value:
- onblur
- Source:
Methods
load()
Load the preferences from local storage
- Source:
save()
Save the preferences to local storage
- Source: