Refactoring Properties with childrenNodesProperties
This commit is contained in:
1 parent
e6f0cb1a78
commit
4aa02711cf
25 files changed
+362
-362
No files matched your search
@@ -48,7 +48,7 @@
|
||||
"isPinned": true,
|
||||
"positionLocked": true,
|
||||
"icon": "ethereum",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "projectDefinition",
|
||||
"type": "node",
|
||||
@@ -89,7 +89,7 @@
|
||||
"isHierarchyHead": true,
|
||||
"addLeftIcons": true,
|
||||
"level": 0,
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "networkClientReference",
|
||||
"type": "node",
|
||||
@@ -179,7 +179,7 @@
|
||||
"compatibleTypes": "->Ethereum Wallet->"
|
||||
},
|
||||
"propertyNameAtParent": "walletAccounts",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "ethBalance",
|
||||
"type": "node",
|
||||
@@ -264,7 +264,7 @@
|
||||
"isHierarchyHead": true,
|
||||
"addLeftIcons": true,
|
||||
"level": 0,
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "erc-20TokenType",
|
||||
"type": "node",
|
||||
@@ -313,7 +313,7 @@
|
||||
"compatibleTypes": "->Ethereum Token Definitions->"
|
||||
},
|
||||
"propertyNameAtParent": "erc-20TokenType",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "ethereumTokens",
|
||||
"type": "array",
|
||||
@@ -347,7 +347,7 @@
|
||||
"compatibleTypes": "->Ethereum Token Definitions->"
|
||||
},
|
||||
"propertyNameAtParent": "erc-223TokenType",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "ethereumTokens",
|
||||
"type": "array",
|
||||
@@ -381,7 +381,7 @@
|
||||
"compatibleTypes": "->Ethereum Token Definitions->"
|
||||
},
|
||||
"propertyNameAtParent": "erc-721TokenType",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "ethereumTokens",
|
||||
"type": "array",
|
||||
@@ -415,7 +415,7 @@
|
||||
"compatibleTypes": "->Ethereum Token Definitions->"
|
||||
},
|
||||
"propertyNameAtParent": "erc-777TokenType",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "ethereumTokens",
|
||||
"type": "array",
|
||||
@@ -465,7 +465,7 @@
|
||||
"compatibleTypes": "->ERC-20 Token Type->ERC-223 Token Type->ERC-721 Token Type->ERC-777 Token Type->"
|
||||
},
|
||||
"propertyNameAtParent": "ethereumTokens",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "smartContracts",
|
||||
"type": "node",
|
||||
@@ -506,7 +506,7 @@
|
||||
"isHierarchyHead": true,
|
||||
"addLeftIcons": true,
|
||||
"level": 0,
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "blockchainNetworks",
|
||||
"type": "array",
|
||||
@@ -540,7 +540,7 @@
|
||||
"compatibleTypes": "->Ethereum Blockchain->"
|
||||
},
|
||||
"propertyNameAtParent": "blockchainNetworks",
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "networkClients",
|
||||
"type": "array",
|
||||
@@ -609,7 +609,7 @@
|
||||
"isHierarchyHead": true,
|
||||
"addLeftIcons": true,
|
||||
"level": 0,
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "smartContracts",
|
||||
"type": "array",
|
||||
@@ -659,7 +659,7 @@
|
||||
"propertyNameAtParent": "smartContracts",
|
||||
"addLeftIcons": true,
|
||||
"level": 1,
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "solidityCode",
|
||||
"type": "node",
|
||||
@@ -728,7 +728,7 @@
|
||||
"compatibleTypes": "->Data Tasks->"
|
||||
},
|
||||
"propertyNameAtParent": "projectDataTasks",
|
||||
"properties": [],
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
@@ -757,7 +757,7 @@
|
||||
"compatibleTypes": "->Learning Tasks->"
|
||||
},
|
||||
"propertyNameAtParent": "projectLearningTasks",
|
||||
"properties": [],
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
@@ -786,7 +786,7 @@
|
||||
"compatibleTypes": "->Trading Tasks->"
|
||||
},
|
||||
"propertyNameAtParent": "projectTradingTasks",
|
||||
"properties": [],
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
@@ -815,7 +815,7 @@
|
||||
"compatibleTypes": "->Data Mines Data->"
|
||||
},
|
||||
"propertyNameAtParent": "projectDataProducts",
|
||||
"properties": [],
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
@@ -844,7 +844,7 @@
|
||||
"compatibleTypes": "->Learning Mine Data->"
|
||||
},
|
||||
"propertyNameAtParent": "projectLearningProducts",
|
||||
"properties": [],
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
@@ -873,7 +873,7 @@
|
||||
"compatibleTypes": "->Trading Mine Data->"
|
||||
},
|
||||
"propertyNameAtParent": "projectTradingProducts",
|
||||
"properties": [],
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
@@ -902,7 +902,7 @@
|
||||
"compatibleTypes": "->Charting Space->"
|
||||
},
|
||||
"propertyNameAtParent": "projectDashboards",
|
||||
"properties": [],
|
||||
"childrenNodesProperties": [],
|
||||
"icon": "bitcoin"
|
||||
},
|
||||
{
|
||||
@@ -942,7 +942,7 @@
|
||||
"initialValues": {
|
||||
"config": "{ \n\"codeName\": \"Type a name with no spaces or dashes\"\n}"
|
||||
},
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "blockchainScannerBots",
|
||||
"type": "array",
|
||||
@@ -996,7 +996,7 @@
|
||||
"chainAttachesTo": {
|
||||
"compatibleTypes": "->Data Mine->"
|
||||
},
|
||||
"properties": [
|
||||
"childrenNodesProperties": [
|
||||
{
|
||||
"name": "processes",
|
||||
"type": "array",
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -127,10 +127,10 @@ exports.newSuperalgosBotModulesSnapshots = function (processIndex) {
|
||||
let nodeDefinition = TS.projects.superalgos.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
+9
-9
@@ -115,10 +115,10 @@ exports.newSuperalgosBotModulesTradingEngine = function (processIndex) {
|
||||
let nodeDefinition = TS.projects.superalgos.globals.taskConstants.APP_SCHEMA_MAP.get(originNode.project + '-' + originNode.type)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -154,10 +154,10 @@ exports.newSuperalgosBotModulesTradingEngine = function (processIndex) {
|
||||
let nodeDefinition = TS.projects.superalgos.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -197,10 +197,10 @@ exports.newSuperalgosBotModulesTradingEngine = function (processIndex) {
|
||||
let nodeDefinition = TS.projects.superalgos.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
+3
-3
@@ -205,10 +205,10 @@ exports.newSuperalgosBotModulesTradingSystem = function (processIndex) {
|
||||
let nodeDefinition = TS.projects.superalgos.globals.taskConstants.APP_SCHEMA_MAP.get(node.project + '-' + node.type)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -24,9 +24,9 @@ exports.newSuperalgosUtilitiesNodeFunctions = function () {
|
||||
return
|
||||
}
|
||||
|
||||
if (nodeDefinition.properties === undefined) { return }
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties === undefined) { return }
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -69,9 +69,9 @@ exports.newSuperalgosUtilitiesNodeFunctions = function () {
|
||||
}
|
||||
|
||||
/* We scan through this node children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -123,9 +123,9 @@ exports.newSuperalgosUtilitiesNodeFunctions = function () {
|
||||
}
|
||||
|
||||
/* We scan through this node children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -37,9 +37,9 @@ function newSuperalgosFunctionLibraryChainAttachDetach() {
|
||||
if (node.payload.parentNode !== undefined) {
|
||||
let parentNodeDefinition = getNodeDefinition(node.payload.parentNode)
|
||||
if (parentNodeDefinition !== undefined) {
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.properties.length; i++) {
|
||||
let property = parentNodeDefinition.properties[i]
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[i]
|
||||
if (nodeDefinition.propertyNameAtParent === property.name) {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -174,9 +174,9 @@ function newSuperalgosFunctionLibraryChainAttachDetach() {
|
||||
if (node.payload.parentNode !== undefined) {
|
||||
let parentNodeDefinition = getNodeDefinition(node.payload.parentNode)
|
||||
if (parentNodeDefinition !== undefined) {
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.properties.length; i++) {
|
||||
let property = parentNodeDefinition.properties[i]
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[i]
|
||||
if (nodeDefinition.propertyNameAtParent === property.name) {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -16,10 +16,10 @@ function newSuperalgosFunctionLibraryDependenciesFilter() {
|
||||
|
||||
let nodeDefinition = getNodeDefinition(node)
|
||||
if (nodeDefinition !== undefined) {
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -16,11 +16,11 @@ function newNodeChildren() {
|
||||
}
|
||||
let parentNodeDefinition = getNodeDefinition(parentNode)
|
||||
if (parentNodeDefinition !== undefined) {
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
|
||||
for (let i = 0; i < parentNodeDefinition.properties.length; i++) {
|
||||
let property = parentNodeDefinition.properties[i]
|
||||
for (let i = 0; i < parentNodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[i]
|
||||
if (parentNode[property.name] !== undefined) {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -30,10 +30,10 @@ function newSuperalgosFunctionLibraryNodeCloning() {
|
||||
}
|
||||
|
||||
/* Children Nodes */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -84,10 +84,10 @@ function newSuperalgosFunctionLibraryNodeCloning() {
|
||||
}
|
||||
|
||||
/* Children Nodes */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -34,10 +34,10 @@ function newSuperalgosFunctionLibraryNodeDeleter() {
|
||||
let nodeDefinition = getNodeDefinition(node)
|
||||
if (nodeDefinition !== undefined) {
|
||||
/* Remove all of its own children nodes. */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -71,9 +71,9 @@ function newSuperalgosFunctionLibraryNodeDeleter() {
|
||||
if (node.payload.parentNode !== undefined) {
|
||||
let parentNodeDefinition = getNodeDefinition(node.payload.parentNode)
|
||||
if (parentNodeDefinition !== undefined) {
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.properties.length; i++) {
|
||||
let property = parentNodeDefinition.properties[i]
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[i]
|
||||
if (nodeDefinition.propertyNameAtParent === property.name) {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -20,10 +20,10 @@ function newSuperalgosFunctionLibraryNodePath() {
|
||||
|
||||
let nodeDefinition = getNodeDefinition(node.payload.parentNode)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
if (nodeDefinition.properties === undefined) { return }
|
||||
if (nodeDefinition.childrenNodesProperties === undefined) { return }
|
||||
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
let parentProperty = node.payload.parentNode[property.name]
|
||||
if (parentProperty === undefined) { continue }
|
||||
|
||||
@@ -16,10 +16,10 @@ function newSuperalgosFunctionLibraryOnFocus() {
|
||||
|
||||
/* Then we check all of its own children nodes. */
|
||||
if (node.payload.floatingObject.isCollapsed !== true) {
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -25,9 +25,9 @@ function newSuperalgosFunctionLibraryProtocolNode() {
|
||||
}
|
||||
|
||||
/* Children Nodes */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -15,10 +15,10 @@ function newSuperalgosFunctionLibraryShortcutKeys() {
|
||||
|
||||
/* Check all of its own children nodes. */
|
||||
if (node.payload.floatingObject.isCollapsed !== true) {
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -19,8 +19,8 @@ function newSuperalgosFunctionLibrarySuperScriptsFunctions() {
|
||||
UI.projects.superalgos.functionLibraries.uiObjectsFromNodes.createUiObjectFromNode(templateClone, target, target)
|
||||
} else {
|
||||
let definition = getNodeDefinition(target)
|
||||
for (let i = 0; i < definition.properties.length; i++) {
|
||||
let property = definition.properties[i]
|
||||
for (let i = 0; i < definition.childrenNodesProperties.length; i++) {
|
||||
let property = definition.childrenNodesProperties[i]
|
||||
if (property.childType === exchangeNodeType) {
|
||||
let exchanges = target[property.name]
|
||||
if (exchanges === undefined) {
|
||||
|
||||
@@ -272,9 +272,9 @@ function newSuperalgosFunctionLibraryUiObjectsFromNodes() {
|
||||
if (parentNode !== undefined) {
|
||||
let parentNodeDefinition = getNodeDefinition(parentNode)
|
||||
if (parentNodeDefinition !== undefined) {
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.properties.length; i++) {
|
||||
let property = parentNodeDefinition.properties[i]
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[i]
|
||||
if (property.childType === node.type) {
|
||||
if (property.type === 'array') {
|
||||
if (parentNode[property.name] !== undefined) {
|
||||
@@ -300,10 +300,10 @@ function newSuperalgosFunctionLibraryUiObjectsFromNodes() {
|
||||
createUiObject(false, node.type, node.name, node, parentNode, chainParent, node.type, positionOffset)
|
||||
|
||||
/* Create Children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
if (node[property.name] !== undefined) {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -390,9 +390,9 @@ function newSuperalgosFunctionLibraryUiObjectsFromNodes() {
|
||||
/* For the cases where a node is not chained to its parent but to the one at the parent before it at its own collection */
|
||||
|
||||
if (nodeDefinition.chainedToSameType === true) {
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.properties.length; i++) {
|
||||
let property = parentNodeDefinition.properties[i]
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < parentNodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[i]
|
||||
if (property.childType === type) {
|
||||
if (property.type === 'array') {
|
||||
if (parentNode[property.name] !== undefined) {
|
||||
@@ -410,9 +410,9 @@ function newSuperalgosFunctionLibraryUiObjectsFromNodes() {
|
||||
|
||||
function initializeArrayProperties() {
|
||||
/* Create Empty Arrays for properties of type Array */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
if (property.type === 'array') {
|
||||
object[property.name] = []
|
||||
}
|
||||
@@ -433,10 +433,10 @@ function newSuperalgosFunctionLibraryUiObjectsFromNodes() {
|
||||
|
||||
function connectToParent() {
|
||||
/* Connect to Parent */
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < parentNodeDefinition.properties.length; i++) {
|
||||
let property = parentNodeDefinition.properties[i]
|
||||
for (let i = 0; i < parentNodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[i]
|
||||
if (property.childType === type) {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -469,10 +469,10 @@ function newSuperalgosFunctionLibraryUiObjectsFromNodes() {
|
||||
|
||||
function autoAddChildren() {
|
||||
/* Auto Add more Children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -505,10 +505,10 @@ function newSuperalgosFunctionLibraryUiObjectsFromNodes() {
|
||||
let nodeDefinition = getNodeDefinition(node)
|
||||
|
||||
/* Connect to Parent */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
if (property.type === 'node') {
|
||||
if (property.name !== previousPropertyName) {
|
||||
if (node[property.name] === undefined) {
|
||||
|
||||
@@ -448,9 +448,9 @@ function newUiObject() {
|
||||
let mustContinue = false
|
||||
let parentNodeDefinition = getNodeDefinition(nearbyNode)
|
||||
if (parentNodeDefinition !== undefined) {
|
||||
if (parentNodeDefinition.properties !== undefined) {
|
||||
for (let j = 0; j < parentNodeDefinition.properties.length; j++) {
|
||||
let property = parentNodeDefinition.properties[j]
|
||||
if (parentNodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let j = 0; j < parentNodeDefinition.childrenNodesProperties.length; j++) {
|
||||
let property = parentNodeDefinition.childrenNodesProperties[j]
|
||||
if (nodeDefinition.propertyNameAtParent === property.name) {
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -736,10 +736,10 @@ function newUiObject() {
|
||||
|
||||
function childrenRunningPhysics() {
|
||||
let nodeDefinition = getNodeDefinition(thisObject.payload.node)
|
||||
if (nodeDefinition.properties === undefined) { return }
|
||||
if (nodeDefinition.childrenNodesProperties === undefined) { return }
|
||||
let monitorChildrenRunning = false
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
if (property.monitorChildrenRunning === true) {
|
||||
let children = thisObject.payload.node[property.name]
|
||||
if (children === undefined) { continue }
|
||||
|
||||
@@ -75,9 +75,9 @@ function newUiObjectConstructor() {
|
||||
|
||||
if (userAddingNew === true) {
|
||||
let definition = getNodeDefinition(payload.parentNode)
|
||||
if (definition.properties !== undefined) {
|
||||
for (let i = 0; i < definition.properties.length; i++) {
|
||||
let property = definition.properties[i]
|
||||
if (definition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < definition.childrenNodesProperties.length; i++) {
|
||||
let property = definition.childrenNodesProperties[i]
|
||||
if (property.childType === payload.node.type) {
|
||||
if (property.type === 'array') {
|
||||
let parentNode = payload.parentNode
|
||||
@@ -94,7 +94,7 @@ function newUiObjectConstructor() {
|
||||
}
|
||||
if (floatingObject.angleToParent === undefined) {
|
||||
for (let j = i - 1; j >= 0; j--) {
|
||||
let siblingProperty = definition.properties[j]
|
||||
let siblingProperty = definition.childrenNodesProperties[j]
|
||||
let parentNode = payload.parentNode
|
||||
let parentNodeProperty = parentNode[siblingProperty.name]
|
||||
if (parentNodeProperty !== undefined) {
|
||||
@@ -119,8 +119,8 @@ function newUiObjectConstructor() {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let j = i + 1; j < definition.properties.length; j++) {
|
||||
let siblingProperty = definition.properties[j]
|
||||
for (let j = i + 1; j < definition.childrenNodesProperties.length; j++) {
|
||||
let siblingProperty = definition.childrenNodesProperties[j]
|
||||
let parentNode = payload.parentNode
|
||||
let parentNodeProperty = parentNode[siblingProperty.name]
|
||||
if (parentNodeProperty !== undefined) {
|
||||
|
||||
@@ -275,7 +275,7 @@ function newSuperalgosTutorialSpace() {
|
||||
if (newDocumentationURL === currentDocumentationURL) { return }
|
||||
|
||||
currentDocumentationURL = newDocumentationURL
|
||||
UI.projects.superalgos.spaces.docsSpace.navigateTo(currentDocumentationURL)
|
||||
UI.projects.superalgos.spaces.docsSpace.openSpaceAreaAndNavigateTo('Node', currentDocumentationURL, 'Superalgos')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ function newSuperalgosUtilitiesBranches() {
|
||||
return
|
||||
}
|
||||
|
||||
if (nodeDefinition.properties === undefined) { return }
|
||||
if (nodeDefinition.childrenNodesProperties === undefined) { return }
|
||||
let lastNodePropertyName
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
if (lastNodePropertyName === property.name) { continue } // Some nodes have a single property por multiple child node types. We need to check repeated properties only once so as no to duplicate results.
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -28,9 +28,9 @@ function newSuperalgosUtilitiesFolders() {
|
||||
let nodeDefinition = getNodeDefinition(originNode)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.name) {
|
||||
case originObjectsArrayPropertyName: {
|
||||
|
||||
@@ -23,10 +23,10 @@ function newSuperalgosUtilitiesHierarchy() {
|
||||
let nodeDefinition = getNodeDefinition(node)
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
let previousPropertyName // Since there are cases where there are many properties with the same name,because they can hold nodes of different types but only one at the time, we have to avoind counting each property of those as individual children.
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -43,9 +43,9 @@ function newSuperalgosUtilitiesMeshes() {
|
||||
|
||||
/* We scan through this node children */
|
||||
if (findInChildren === true) {
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
@@ -22,9 +22,9 @@ function newSuperalgosUtilitiesNodeChildren() {
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
/* We scan through this node children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -85,9 +85,9 @@ function newSuperalgosUtilitiesNodeChildren() {
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
/* We scan through this node children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -171,9 +171,9 @@ function newSuperalgosUtilitiesNodeChildren() {
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
/* We scan through this parent node children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
@@ -209,9 +209,9 @@ function newSuperalgosUtilitiesNodeChildren() {
|
||||
if (nodeDefinition === undefined) { return }
|
||||
|
||||
/* We scan through this node children */
|
||||
if (nodeDefinition.properties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.properties.length; i++) {
|
||||
let property = nodeDefinition.properties[i]
|
||||
if (nodeDefinition.childrenNodesProperties !== undefined) {
|
||||
for (let i = 0; i < nodeDefinition.childrenNodesProperties.length; i++) {
|
||||
let property = nodeDefinition.childrenNodesProperties[i]
|
||||
|
||||
switch (property.type) {
|
||||
case 'node': {
|
||||
|
||||
Reference in new issue
Block a user