@@ -31,11 +31,11 @@ module.exports = {
3131 ** (suppresses asking for a full URI or workspace)
3232 **
3333 */
34- function newThingUI ( context , thePanes ) {
35- const dom = context . dom
36- const div = context . div
37- if ( context . me && ! context . me . uri ) {
38- throw new Error ( 'newThingUI: Invalid userid: ' + context . me )
34+ function newThingUI ( createContext , dataBrowserContext , thePanes ) {
35+ const dom = createContext . dom
36+ const div = createContext . div
37+ if ( createContext . me && ! createContext . me . uri ) {
38+ throw new Error ( 'newThingUI: Invalid userid: ' + createContext . me )
3939 }
4040
4141 var iconStyle = 'padding: 0.7em; width: 2em; height: 2em;' // was: 'padding: 1em; width: 3em; height: 3em;'
@@ -68,7 +68,7 @@ function newThingUI (context, thePanes) {
6868 return new Promise ( function ( resolve , reject ) {
6969 var selectUI // , selectUIParent
7070 function callbackWS ( ws , newBase ) {
71- UI . authn . logInLoadProfile ( context ) . then (
71+ UI . authn . logInLoadProfile ( createContext ) . then (
7272 _context => {
7373 var newPaneOptions = {
7474 newBase : newBase ,
@@ -85,7 +85,7 @@ function newThingUI (context, thePanes) {
8585 newPaneOptions . newBase
8686 )
8787 options . pane
88- . mintNew ( context , newPaneOptions )
88+ . mintNew ( dataBrowserContext , newPaneOptions )
8989 . then ( function ( newPaneOptions ) {
9090 if ( ! newPaneOptions || ! newPaneOptions . newInstance ) {
9191 throw new Error ( 'Cannot mint new - missing newInstance' )
@@ -197,7 +197,7 @@ function newThingUI (context, thePanes) {
197197 return classMap
198198 } , { } )
199199 mintingPanes . forEach ( pane => {
200- const icon = context . div . appendChild ( dom . createElement ( 'img' ) )
200+ const icon = createContext . div . appendChild ( dom . createElement ( 'img' ) )
201201 icon . setAttribute ( 'src' , pane . icon )
202202 const noun = pane . mintClass
203203 ? mintingClassMap [ pane . mintClass ] > 1
@@ -212,15 +212,15 @@ function newThingUI (context, thePanes) {
212212 selectTool ( icon )
213213 makeNewAppInstance ( {
214214 event : e ,
215- folder : context . folder ,
215+ folder : createContext . folder ,
216216 iconEle : icon ,
217217 pane,
218218 noun,
219219 noIndexHTML : true , // do NOT @@ for now write a HTML file
220- div : context . div ,
221- me : context . me ,
222- dom : context . dom ,
223- refreshTarget : context . refreshTarget
220+ div : createContext . div ,
221+ me : createContext . me ,
222+ dom : createContext . dom ,
223+ refreshTarget : createContext . refreshTarget
224224 } )
225225 } )
226226 }
0 commit comments