diff --git a/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js b/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js index a3881ef50..807373fea 100644 --- a/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js +++ b/DesignerSpace/Workspace/FunctionLibraries/UiObjectsFromNodes.js @@ -568,14 +568,13 @@ function newUiObjectsFromNodes () { } function addNetwork (node) { - if (node.network === undefined) { - node.network = { - name: 'Superalgos' - } - createUiObject('Network', node.network.name, node.network, node, node, 'Network') + let network = { + name: 'Superalgos' } + node.rootNodes.push(network) + createUiObject('Network', network.name, network, node, undefined, 'Network') - return node.network + return network } function addNetworkNode (node) { diff --git a/FloatingSpace/UiObjectConstructor.js b/FloatingSpace/UiObjectConstructor.js index f3e04cc2d..27c25a6bc 100644 --- a/FloatingSpace/UiObjectConstructor.js +++ b/FloatingSpace/UiObjectConstructor.js @@ -204,7 +204,18 @@ function newUiObjectConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: -10 + angle: -20 + }, + { + action: 'Add Network', + actionFunction: payload.onMenuItemClick, + label: 'Add Network', + visible: true, + relatedUiObject: 'Network', + rawRadius: 8, + targetRadius: 0, + currentRadius: 0, + angle: 0 }, { action: 'Share Workspace', @@ -216,7 +227,7 @@ function newUiObjectConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: 10 + angle: 20 }] break } @@ -234,7 +245,7 @@ function newUiObjectConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: -40 + angle: -30 } ) menuItemsInitialValues.push( @@ -247,22 +258,9 @@ function newUiObjectConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: -20 + angle: -10 } ) - menuItemsInitialValues.push( - { - action: 'Add Network', - actionFunction: payload.onMenuItemClick, - label: 'Add Network', - visible: true, - relatedUiObject: 'Network', - rawRadius: 8, - targetRadius: 0, - currentRadius: 0, - angle: 0 - } - ) menuItemsInitialValues.push( { action: 'Delete Definition', @@ -276,7 +274,7 @@ function newUiObjectConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: 20 + angle: 10 } ) menuItemsInitialValues.push( @@ -290,7 +288,7 @@ function newUiObjectConstructor () { rawRadius: 8, targetRadius: 0, currentRadius: 0, - angle: 40 + angle: 30 } ) break