Add Network from Workspace

This commit is contained in:
Luis Fernando Molina committed 2019-10-27 22:50:11 +01:00
1 parent 30800639a5
commit 6cd3b1c1fd
2 files changed
+22 -25

No files matched your search

@@ -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) {
+17 -19
View File
@@ -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