@@ -31,6 +31,7 @@ class ToM{
3131 copyPaste : ' ToM_copy' ,
3232 select : ' ToM_select' ,
3333 openMap : ' ToM_openMap' ,
34+ openTutMap : ' ToM_openTutMap' ,
3435 ]
3536
3637 static final exeHowIcons = [' emoji-1F507' , ' emoji-2328' , ' emoji-1F5B1' ]
@@ -107,14 +108,17 @@ class ToM{
107108 case styles. openMap:
108109 addOpenMapPane(myPanel, tutNode)
109110 break
111+ case styles. openTutMap:
112+ addInspectPane(myPanel, tutNode)
113+ break
110114 default :
111115 ui. informationMessage(' node style not defined' )
112116 break
113117 }
114118 startingNewPage = false
115119 if (interruptLoop) break
116120 }
117- if (! interruptLoop) addNextPagePane(myPanel, null )
121+ if (! interruptLoop) addNextPagePane(myPanel, nextTutNodes[ -1 ], false , false )
118122 tomui. adjustHeight(myPanel, doClear)
119123 }
120124
@@ -144,14 +148,14 @@ class ToM{
144148 addPageTitle(myP, nodo. text)
145149 }
146150
147- def static addNextPagePane (myP , lastNode , boolean included = false ){
151+ def static addNextPagePane (myP , lastNode , boolean included = false , boolean showNextButton = true ){
148152 def closeLabel = ' Stop tutorial'
149153 def closeToolTip = ' Click to stop the tutorial and close the tutorial tab'
150154 def nextLabel = ' Next page'
151155 def nextToolTip = ' Click to continue to the next page of the tutorial'
152- def bttnAction = lastNode ? { e -> fillPage(myP, lastNode, included, true ) } : null
153- def tocLabel = ' Table of Contents'
154- def tocToolTip = ' Click to show the Table of Contents of the tutorial'
156+ def bttnAction = showNextButton ? { e -> fillPage(myP, lastNode, included, true ) } : null
157+ def tocLabel = ' Table of Contents'
158+ def tocToolTip = ' Click to show the Table of Contents of the tutorial'
155159 def tocBttnAction = { e -> showTOC(myP,lastNode) }
156160
157161 def nextButtonPanel = tomui. getNextButtonPanel(tabName, closeLabel, closeToolTip, nextLabel, nextToolTip , bttnAction, tocLabel, tocToolTip, tocBttnAction)
@@ -412,6 +416,22 @@ class ToM{
412416 myP. add(buttonPanel, tomui. GBC )
413417 }
414418
419+ def static addInspectPane (myP , nodo ){
420+ def msgHtml = " Click to inspect this page in the tutorial map"
421+ def bttnText = " inspect"
422+ def bttnToolTip = " Click to select the page's source nodes"
423+ def bttnAction = { e ->
424+ def pageNode = nodo. parent
425+ def m = c. mapLoader(nodo. map. file). withView()// .selectNodeById(pageNodeId)
426+ m. load()
427+ pageNode. pathToRoot* . folded = false
428+ c. select(pageNode)
429+ }
430+ def buttonPanel = tomui. getButtonPanel(msgHtml,bttnText,bttnToolTip, bttnAction, false )
431+ myP. add(buttonPanel, tomui. GBC )
432+ }
433+
434+
415435 // end:
416436
417437 // region: Getting map
0 commit comments