Class: Presentation

model/Presentation.Presentation()

Sozi presentation.

Constructor

new Presentation()

Initialize a Sozi document object.

Source:

Extends

  • EventEmitter

Members

aspectHeight :number

The height of the aspect ratio used in the editor for this presentation.

Type:
  • number
Default Value:
  • 3
Source:

aspectWidth :number

The width of the aspect ratio used in the editor for this presentation.

Type:
  • number
Default Value:
  • 4
Source:

customFiles :Array.<string>

The custom CSS and JavaScript files to add to the generated HTML presentation.

Type:
  • Array.<string>
Default Value:
  • []
Source:

document :SVGDocument

The SVG document attached to this presentation.

Set it with module:model/Presentation.Presentation#setSVGDocument.

Type:
  • SVGDocument
Source:

elementsToHide :Array.<SVGElement>

The list of SVG elements to hide when playing the presentation.

Type:
  • Array.<SVGElement>
Default Value:
  • []
Source:

enableKeyboardNavigation :boolean

When playing the presentation, are the keyboard shortcuts for navigation enabled?

Type:
  • boolean
Default Value:
  • true
Source:

enableKeyboardRotation :boolean

When playing the presentation, are the keyboard shortcuts for rotation enabled?

Type:
  • boolean
Default Value:
  • true
Source:

enableKeyboardZoom :boolean

When playing the presentation, are the keyboard shortcuts for zoom-in and zoom-out enabled?

Type:
  • boolean
Default Value:
  • true
Source:

enableMouseNavigation :boolean

When playing the presentation, are the mouse gestures for navigation enabled?

Type:
  • boolean
Default Value:
  • true
Source:

enableMouseRotation :boolean

When playing the presentation, are the mouse gestures for rotation enabled?

Type:
  • boolean
Default Value:
  • true
Source:

enableMouseTranslation :boolean

When playing the presentation, is the mouse gesture for translation enabled?

Type:
  • boolean
Default Value:
  • true
Source:

enableMouseZoom :boolean

When playing the presentation, are the mouse gestures for zoom-in and zoom-out enabled?

Type:
  • boolean
Default Value:
  • true
Source:

exportToPDFExclude :string

The list of frame numbers to exclude in the PDF export.

Type:
  • string
Source:

exportToPDFInclude :string

The list of frame numbers to include in the PDF export.

Type:
  • string
Source:

exportToPDFPageOrientation :string

The page orientation for PDF export.

Type:
  • string
Default Value:
  • landscape
Source:

exportToPDFPageSize :string

The page size for PDF export.

Type:
  • string
Default Value:
  • A4
Source:

exportToPPTXExclude :string

The list of frame numbers to exclude in the PPTX export.

Type:
  • string
Source:

exportToPPTXInclude :string

The list of frame numbers to include in the PPTX export.

Type:
  • string
Source:

exportToPPTXSlideSize :string

The slide size for PPTX export.

Type:
  • string
Default Value:
  • screen4x3
Source:

exportToVideoBitRate :number

The number of bits per second in the exported video.

Type:
  • number
Default Value:
  • 2000000
Source:

exportToVideoFormat :string

The file extension of the exported video.

Type:
  • string
Default Value:
  • webm
Source:

exportToVideoFrameRate :number

The number of images per second in the exported video.

Type:
  • number
Default Value:
  • 50
Source:

exportToVideoHeight :number

The height of the exported video, in pixels.

Type:
  • number
Default Value:
  • 720
Source:

exportToVideoWidth :number

The width of the exported video, in pixels.

Type:
  • number
Default Value:
  • 1280
Source:

exportType :string

The last export document type.

Type:
  • string
Default Value:
  • pdf
Source:

frames :Array.<module:model/Presentation.Frame>

The sequence of frames in this presentation.

Type:
Default Value:
  • []
Source:

initialCameraState :module:model/CameraState.CameraState

The initial camera state.

This property is initialized after the document has been loaded and displayed.

Type:
Source:

layers :Array.<module:model/Presentation.Layer>

A representation of the layers of the SVG document.

Type:
Default Value:
  • []
Source:

(readonly) title :string

The title of this presentation.

This property is extracted from the <title> element of the SVG document. Its default value is "Untitled".

Type:
  • string
Source:

updateURLOnFrameChange :boolean

When playing the presentation, does the URL change automatically on frame change?

Type:
  • boolean
Default Value:
  • true
Source:

Methods

fromStorable(storable)

Copy the properties of the given object into this instance.

Parameters:
Name Type Description
storable object

A plain object with the properties to copy.

Source:

getCustomFiles(ext) → {Array.<string>}

Get the custom files with the given extension.

Parameters:
Name Type Description
ext string

The file extension.

Source:
Returns:
  • The custom files that have that extension.
Type
Array.<string>

getFrameWithId(frameId) → (nullable) {module:model/Presentation.Frame}

Get the frame with a given ID in the current presentation.

Parameters:
Name Type Description
frameId string

The ID of the frame to find.

Source:
Returns:
  • The frame with that ID.
Type
module:model/Presentation.Frame

getLayerWithId(groupId) → (nullable) {module:model/Presentation.Layer}

Get the layer with a given ID in the current presentation.

Parameters:
Name Type Description
groupId string

The ID of an SVG group that represents a layer.

Source:
Returns:
  • The layer that maps to a group with that ID.
Type
module:model/Presentation.Layer

makeFrameId() → {string}

Create a new unique identifier for a frame in this presentation.

Source:
Returns:
  • A new ID
Type
string

setInitialCameraState()

Sets the initial state of all cameras to fit the bounding box of the SVG content.

Source:

setSVGDocument(svgDocument)

Set the SVG document for this presentation.

This method populates the module:model/Presentation.Presentation#layers property of this instance.

Parameters:
Name Type Description
svgDocument SVGDocument

The SVG document to use.

Source:
Fires:

toMinimalStorable() → {object}

Convert this instance to a plain object that can be stored as JSON.

The result contains only the properties needed by the Sozi player to show and animate the presentation.

Source:
Returns:
  • A plain object with the properties needed by the player.
Type
object

toStorable() → {object}

Convert this instance to a plain object that can be stored as JSON.

The result contains all the properties needed by the editor to restore the state of this instance.

Source:
Returns:
  • A plain object with the properties needed by the editor.
Type
object

updateLinkedLayers()

Update the camera states and layer properties of all linked layers in all frames.

This method must be called to propagate the changes in some frames to the frames that are linked to them.

Source: