@@ -38,7 +38,7 @@ const viewName = 'preview', // for back button and sidecar header
3838 *
3939 */
4040module . exports = ( commandTree , prequire ) => {
41- const render = ( input , options ) => new Promise ( ( resolve , reject ) => {
41+ const render = ( input , options , execOptions ) => new Promise ( ( resolve , reject ) => {
4242 debug ( 'options' , options )
4343 let fsmPromise , type , extraModes = [ ]
4444
@@ -64,16 +64,21 @@ module.exports = (commandTree, prequire) => {
6464
6565 // create a fake action/entity record
6666 const formatForUser = defaultMode => ( { fsm, code} ) => {
67-
6867 // pass through cli options for the wskflow renderer
6968 const viewOptions = { }
69+
7070 if ( options . functions ) {
7171 // note we must be careful not to pass false; only undefined
7272 viewOptions . renderFunctionsInView = options . functions // render all inline functions directly in the view?
7373 }
7474
75+ if ( execOptions . container ) {
76+ // if we're rendering this inside of a given viewport, then don't modify the sidecar header
77+ viewOptions . noHeader = true
78+ }
79+
7580 const { visualize} = prequire ( 'wskflow' )
76- const { view, controller } = wskflow ( visualize , viewName , { fsm, input, name, viewOptions } )
81+ const { view, controller } = wskflow ( visualize , viewName , { fsm, input, name, viewOptions, container : execOptions . container } )
7782 extraModes = extraModes . concat ( zoomToFitButtons ( controller ) )
7883
7984 const entity = {
@@ -177,7 +182,7 @@ module.exports = (commandTree, prequire) => {
177182 options . alreadyWatching = execOptions . alreadyWatching ;
178183 }
179184
180- render ( input , options ) . then ( resolve , reject )
185+ render ( input , options , execOptions ) . then ( resolve , reject )
181186
182187 // and set up a file watcher to re-render upon change of the file
183188 if ( ! execOptions || ! execOptions . alreadyWatching ) {
0 commit comments