Bug Fixed, search engine never started.

This commit is contained in:
Luis Fernando Molina committed 2021-02-08 20:30:47 +01:00
1 parent d1a703d72b
commit d21292600e
2 files changed
+21 -15

No files matched your search

@@ -18,16 +18,20 @@ function newSuperalgosDocsSearchEngine() {
function setUpSearchEngine(callbackFunction) {
/*
This is a way to avoid indexing the docs, if the user does not want to.
*/
let docsSpaceNode = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadsByType('Docs Space')
if (docsSpaceNode === undefined) { return }
if (docsSpaceNode.spaceSettings === undefined) { return }
let indexContent = UI.projects.superalgos.utilities.nodeConfig.loadPropertyFromNodeConfig(docsSpaceNode.spaceSettings.payload, 'indexContent')
if (indexContent === false) {
callbackFunction()
return
if (docsSpaceNode !== undefined) {
if (docsSpaceNode.spaceSettings !== undefined) {
let indexContent = UI.projects.superalgos.utilities.nodeConfig.loadPropertyFromNodeConfig(docsSpaceNode.spaceSettings.payload, 'indexContent')
if (indexContent === false) {
callbackFunction()
return
}
}
}
let totalAsyncCallsMade = 0
let totalAsyncCallsFinished = 0
@@ -47,13 +51,13 @@ function newSuperalgosDocsSearchEngine() {
totalAsyncCallsMade++
totalAsyncCallsMade++
setTimeout(searchInNodes, 10)
setTimeout(searchInConcepts, 20)
setTimeout(searchInNTopics, 30)
setTimeout(searchInTutorials, 40)
setTimeout(searchInReviews, 50)
setTimeout(searchInBooks, 60)
setTimeout(searchInWorkspaces, 70)
setTimeout(searchInNodes, 10)
setTimeout(searchInConcepts, 20)
setTimeout(searchInNTopics, 30)
setTimeout(searchInTutorials, 40)
setTimeout(searchInReviews, 50)
setTimeout(searchInBooks, 60)
setTimeout(searchInWorkspaces, 70)
function searchInNodes() {
/* Search in Nodes */
+2
View File
@@ -367,6 +367,8 @@ function newCanvas() {
}
async function onKeyDown(event) {
if (UI.projects.superalgos.spaces.designSpace.workspace === undefined) { return }
if (EDITOR_ON_FOCUS === true) {
/*
We will fordward the event to whoever is