Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:developer:3dmapping_sdk:viewer_state [2019/01/31 15:30] pieter.bonne@orbitgt.com |
dev:developer:3dmapping_sdk:viewer_state [2020/05/15 11:22] jeroen removed |
||
---|---|---|---|
Line 8: | Line 8: | ||
To listen for state changes, we listen to the '' | To listen for state changes, we listen to the '' | ||
+ | |||
+ | Below is a pseudocode example of storing application state in the browser' | ||
<code javascript> | <code javascript> | ||
Line 15: | Line 17: | ||
// Save state | // Save state | ||
function handleAppStateChanged(state) { | function handleAppStateChanged(state) { | ||
- | window.localStorage.etItem(" | + | window.localStorage.getItem(" |
} | } | ||
</ | </ | ||
Line 24: | Line 26: | ||
Startup options can be provided only once, on viewer construction. | Startup options can be provided only once, on viewer construction. | ||
+ | |||
+ | Below is a pseudocode example of restoring the application state using the state we have previously stored in the browser' | ||
<code javascript> | <code javascript> |