Fixes with no loading new objects
This commit is contained in:
1 parent
fcc11a0b63
commit
01ba1226af
4 files changed
+28
-10
No files matched your search
@@ -261,7 +261,7 @@ function newCanvas () {
|
||||
if (event.keyCode >= 65 && event.keyCode <= 90) {
|
||||
let nodeUsingThisKey = canvas.strategySpace.workspace.getNodeByShortcutKey(event.key)
|
||||
|
||||
if (nodeOnFocus === undefined) {
|
||||
if (nodeOnFocus === undefined && nodeUsingThisKey !== undefined) {
|
||||
/* Then we displace the whole workspace to center it at the node using this key */
|
||||
nodeUsingThisKey = canvas.floatingSpace.positionAtNode(nodeUsingThisKey)
|
||||
return
|
||||
@@ -271,7 +271,7 @@ function newCanvas () {
|
||||
event.preventDefault()
|
||||
|
||||
/* If there is a node in focus, we try to assign the key to it. */
|
||||
if (nodeUsingThisKey !== undefined) {
|
||||
if (nodeUsingThisKey !== undefined && nodeOnFocus !== undefined) {
|
||||
if (nodeUsingThisKey.id === nodeOnFocus.id) {
|
||||
nodeOnFocus.payload.uiObject.shortcutKey = ''
|
||||
nodeOnFocus.payload.uiObject.setValue('Shortcut Key Removed ')
|
||||
@@ -281,9 +281,11 @@ function newCanvas () {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
nodeOnFocus.payload.uiObject.shortcutKey = event.key
|
||||
nodeOnFocus.payload.uiObject.setValue('Shortcut Key: Ctrl + ' + event.key)
|
||||
/* If there is not node using this key and a node in focus, we assign this key to this node */
|
||||
if (nodeUsingThisKey === undefined && nodeOnFocus !== undefined) {
|
||||
nodeOnFocus.payload.uiObject.shortcutKey = event.key
|
||||
nodeOnFocus.payload.uiObject.setValue('Shortcut Key: Ctrl + ' + event.key)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -456,8 +456,8 @@ function newOnFocus () {
|
||||
}
|
||||
case 'Social Bots': {
|
||||
let child
|
||||
for (let m = 0; m < node.socialBots.length; m++) {
|
||||
child = getNodeThatIsOnFocus(node.socialBots[m])
|
||||
for (let m = 0; m < node.bots.length; m++) {
|
||||
child = getNodeThatIsOnFocus(node.bots[m])
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
@@ -601,6 +601,10 @@ function newOnFocus () {
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
child = getNodeThatIsOnFocus(node.socialBots)
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
if (node.payload.uiObject.isOnFocus === true) {
|
||||
return node
|
||||
} else {
|
||||
@@ -618,6 +622,10 @@ function newOnFocus () {
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
child = getNodeThatIsOnFocus(node.socialBots)
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
if (node.payload.uiObject.isOnFocus === true) {
|
||||
return node
|
||||
} else {
|
||||
@@ -635,6 +643,10 @@ function newOnFocus () {
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
child = getNodeThatIsOnFocus(node.socialBots)
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
if (node.payload.uiObject.isOnFocus === true) {
|
||||
return node
|
||||
} else {
|
||||
@@ -652,6 +664,10 @@ function newOnFocus () {
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
child = getNodeThatIsOnFocus(node.socialBots)
|
||||
if (child !== undefined) {
|
||||
return child
|
||||
}
|
||||
if (node.payload.uiObject.isOnFocus === true) {
|
||||
return node
|
||||
} else {
|
||||
|
||||
@@ -476,7 +476,7 @@ function newStringifyNode () {
|
||||
savedPayload: getSavedPayload(node)
|
||||
}
|
||||
|
||||
if (node.announcements !== undefined) {
|
||||
if (node.bots !== undefined) {
|
||||
for (let m = 0; m < node.bots.length; m++) {
|
||||
let bot = prepareForStringify(node.bots[m], removePersonalData)
|
||||
object.bots.push(bot)
|
||||
|
||||
@@ -48,7 +48,7 @@ function newWorkspace () {
|
||||
let functionLibraryNodeDeleter = newNodeDeleter()
|
||||
let functionLibraryPartsFromNodes = newPartsFromNodes()
|
||||
let functionLibraryProtocolNode = newProtocolNode()
|
||||
let functionLibraryWorkspaceNodes = newStringifyNode()
|
||||
let functionLibraryStringifyNodes = newStringifyNode()
|
||||
let functionLibraryTaskFunctions = newTaskFunctions()
|
||||
let functionLibrarySessionFunctions = newSessionFunctions()
|
||||
let functionLibraryShortcutKeys = newShortcutKeys()
|
||||
@@ -132,7 +132,7 @@ function newWorkspace () {
|
||||
let stringifyReadyNodes = []
|
||||
for (let i = 0; i < thisObject.workspaceNode.rootNodes.length; i++) {
|
||||
let rootNode = thisObject.workspaceNode.rootNodes[i]
|
||||
let node = functionLibraryWorkspaceNodes.prepareForStringify(rootNode, removePersonalData)
|
||||
let node = functionLibraryStringifyNodes.prepareForStringify(rootNode, removePersonalData)
|
||||
if (node) {
|
||||
stringifyReadyNodes.push(node)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user