SessionStorageAPI#
Interface SessionStorageAPI
Hierarchy
- SessionStorageAPI
Methods
change Snapshot
- change
Snapshot(snapshotID, properties): SnapshotProperties -
Changes one or more properties of a Snapshot with the specified ID.
Parameters
-
snapshotID: number
The ID of the Snapshot you want to change.
-
properties: SnapshotProperties
The properties of the Snapshot you want to change.
Returns SnapshotProperties
An object with the changed Properties.
-
- change
Snapshot(snapshotID, name?, screenshotURL?, order?): SnapshotProperties -
This changes the textual description of the Snapshot for given snapshotID to the value of text.
Parameters
-
snapshotID: number
The ID of the Snapshot.
-
Optional
name: stringThe new name of the Snapshot.
-
Optional
screenshotURL: stringThe new screenshot URL of the Snapshot.
-
Optional
order: numberThe order inside the List of Snapshots.
Returns SnapshotProperties
Deprecated
Calling changeSnapshot with single parameters is deprecated, please use SnapshotProperties instead.
-
create Snapshot
- create
Snapshot(name?, options?): Promise<number> -
Creates a Snapshot of the current.
Parameters
-
Optional
name: stringThe Name of the Snapshot.
-
Optional
options: SnapshotCreationOptionsOptions used for the Snapshot creation.
Returns Promise<number>
The Snapshot ID.
-
get Snapshot Data
- get
Snapshot Data(snapshotID): {
attachmentID: number;
name: string;
order: number;
} -
Parameters
-
snapshotID: number
Returns {
attachmentID: number;
name: string;
order: number;
}The data of the specified Snapshot.
-
attachmentID: number
-
name: string
-
order: number
Deprecated
getSnapshotData is deprecated, please use requestSnapshotData instead.
-
get Snapshots
import Session
is Offline Storage Available
- is
Offline Storage Available(): Promise<boolean> -
Checks if offline storage is currently available which can be used to transfer a session via transferSession.
Returns Promise<boolean>
remove Snapshot
request Snapshot Data
- request
Snapshot Data(snapshotID): Promise<void | SnapshotProperties> -
Parameters
-
snapshotID: number
Returns Promise<void | SnapshotProperties>
The data of the specified Snapshot.
-
restore Session
restore Snapshot
- restore
Snapshot(snapshotID, options?): Promise<void> -
Restores the Snapshot for the given snapshotID. The settings parameter allows to control the subset of the Snapshot data to be restored.
Parameters
-
snapshotID: number
-
Optional
options: SnapshotRestoreOptions
Returns Promise<void>
-
store Session
- store
Session(offline?, progressCallback?): Promise<string | void> -
Temporarily stores the Session in the infrastructure and returns an access handle.
Parameters
-
Optional
offline: boolean -
Optional
progressCallback: StoreSessionProgressCallback
Returns Promise<string | void>
The access handle of the stored Session.
-
transfer Session
- transfer
Session(progressCallback?): Promise<string | void> Experimental
Temporarily transfers the Session to a local storage and returns an access handle.
Parameters
-
Optional
progressCallback: StoreSessionProgressCallbackCan be used to track the progress of the transfer.
Returns Promise<string | void>
The access handle of the transferred Session.
-
With these functions the user can control webvis' management of SessionStorage objects and Snapshots.
The Session describes the whole state of the 3D Space, which can be shared, stored and restored. Snapshot are a subset of a 3D Space and describe a momentary state, which can include other elements of the 3D Space like Clipplanes and Measurements.