You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snapshots play a key role in exporting images and storytelling.
When a component is exported, a snapshot is taken of the current layout and is then rendered in the backend using that layout. This works fairly well as long as the enigma model is not used to e.g. fetch more data.
The developer should therefore be allowed to control what is included in the snapshot in order to reproduce the state of the component without the presence of a backend.
component: {render({ layout, context }){if(layout.additionalData){// assume a snapshot is being rendered// render stuff}elseif(context.permissions.indexOf('fetch')!==-1){// access to engine is permittedthis.model.getHyperCubeData(/* */).then((pages)=>{this.additionalData=pages;// temporarily store the data});}},takeSnapshot({ layout }){// store the additional datalayout.additionalData=this.additionalData;}}
Snapshots play a key role in exporting images and storytelling.
When a component is exported, a snapshot is taken of the current layout and is then rendered in the backend using that layout. This works fairly well as long as the enigma model is not used to e.g. fetch more data.
The developer should therefore be allowed to control what is included in the snapshot in order to reproduce the state of the component without the presence of a backend.
Related to #26
The text was updated successfully, but these errors were encountered: