closeTutorialEditor command improved to show search page
This commit is contained in:
1 parent
2e1d3c944a
commit
ae38c94bd7
2 files changed
+9
-1
No files matched your search
@@ -28,6 +28,7 @@ function newSuperalgosDocSpace() {
|
||||
exitEditMode: exitEditMode,
|
||||
openSpaceAreaAndNavigateTo: openSpaceAreaAndNavigateTo,
|
||||
navigateTo: navigateTo,
|
||||
searchPage: searchPage,
|
||||
scrollToElement: scrollToElement,
|
||||
physics: physics,
|
||||
draw: draw,
|
||||
@@ -222,7 +223,7 @@ function newSuperalgosDocSpace() {
|
||||
}
|
||||
|
||||
function sharePage() {
|
||||
let clipboard = "docs.goto " + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type
|
||||
let clipboard = "docs.goto " + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.project + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.category + '->' + UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered.type
|
||||
UI.projects.superalgos.utilities.clipboard.copyTextToClipboard(clipboard)
|
||||
}
|
||||
|
||||
@@ -291,6 +292,11 @@ function newSuperalgosDocSpace() {
|
||||
thisObject.sidePanelTab.open()
|
||||
}
|
||||
|
||||
function searchPage() {
|
||||
UI.projects.superalgos.spaces.docsSpace.currentDocumentBeingRendered = undefined
|
||||
thisObject.mainSearchPage.render()
|
||||
}
|
||||
|
||||
function navigateTo(project, category, type, anchor, nodeId, placeholder) {
|
||||
|
||||
EDITOR_ON_FOCUS = false // forced exit
|
||||
|
||||
@@ -1200,6 +1200,8 @@ function newSuperalgosTutorialSpace() {
|
||||
if (nodeConfig.controlDocs !== undefined) {
|
||||
if (nodeConfig.controlDocs.closeTutorialEditor !== true) {
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
|
||||
} else {
|
||||
UI.projects.superalgos.spaces.docsSpace.searchPage()
|
||||
}
|
||||
} else {
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo(nodeConfig.docs.project, 'Tutorial', nodeConfig.docs.type)
|
||||
|
||||
Reference in new issue
Block a user