diff --git a/Projects/Governance/Schemas/App-Schema/assets.json b/Projects/Governance/Schemas/App-Schema/assets.json index 2bf1d5d48..5a11b331d 100644 --- a/Projects/Governance/Schemas/App-Schema/assets.json +++ b/Projects/Governance/Schemas/App-Schema/assets.json @@ -75,5 +75,11 @@ "childType": "Asset", "autoAdd": false } - ] + ], + "inMapMode": { + "showNodeType": false, + "showHierarchyHeadRing": false, + "smallIcon": true, + "smallText": true + } } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/features.json b/Projects/Governance/Schemas/App-Schema/features.json index 6c4350248..0ead832ca 100644 --- a/Projects/Governance/Schemas/App-Schema/features.json +++ b/Projects/Governance/Schemas/App-Schema/features.json @@ -52,5 +52,11 @@ "childType": "Feature", "autoAdd": false } - ] + ], + "inMapMode": { + "showNodeType": false, + "showHierarchyHeadRing": false, + "smallIcon": true, + "smallText": true + } } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/pools.json b/Projects/Governance/Schemas/App-Schema/pools.json index 606c23662..78dfba7ee 100644 --- a/Projects/Governance/Schemas/App-Schema/pools.json +++ b/Projects/Governance/Schemas/App-Schema/pools.json @@ -65,5 +65,11 @@ "childType": "Pool", "autoAdd": false } - ] + ], + "inMapMode": { + "showNodeType": false, + "showHierarchyHeadRing": false, + "smallIcon": true, + "smallText": true + } } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/positions.json b/Projects/Governance/Schemas/App-Schema/positions.json index 4669e8e65..1f8ae1f51 100644 --- a/Projects/Governance/Schemas/App-Schema/positions.json +++ b/Projects/Governance/Schemas/App-Schema/positions.json @@ -52,5 +52,11 @@ "childType": "Position", "autoAdd": false } - ] + ], + "inMapMode": { + "showNodeType": false, + "showHierarchyHeadRing": false, + "smallIcon": true, + "smallText": true + } } \ No newline at end of file diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index fe9ca970f..4c876cdee 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -55,59 +55,65 @@ function newGovernanceUserProfileSpace() { } } let userProfiles = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') - /* - Here we will change the Y position of all profiles so that they are all at the same level. - */ + let pools = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Pools') + let assets = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Assets') + let features = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Features') + let positions = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Positions') + const SPACE_WIDTH = UI.projects.foundations.spaces.floatingSpace.container.frame.width const SPACE_HEIGHT = UI.projects.foundations.spaces.floatingSpace.container.frame.height - const X_STEP = SPACE_WIDTH / (userProfiles.length + 1) - const Y_STEP = 3000 + arrangeNodes(userProfiles, SPACE_HEIGHT * 0.425, 3000) + arrangeNodes(pools, SPACE_HEIGHT * 0.595, 0) + arrangeNodes(features, SPACE_HEIGHT * 0.635, 0) + arrangeNodes(positions, SPACE_HEIGHT * 0.675, 0) + arrangeNodes(assets, SPACE_HEIGHT * 0.835, 3000) - const Y_LEVEL = SPACE_HEIGHT * 0.425 - let xOffset = X_STEP - let yOffset = 0 - for (let i = 0; i < userProfiles.length; i++) { - userProfiles[i].payload.floatingObject.container.frame.position.x = xOffset - xOffset = xOffset + X_STEP - } - for (let i = 0; i < userProfiles.length; i++) { - switch (true) { - case (yOffset === 0): { - yOffset = Y_STEP - break - } - case (yOffset === Y_STEP): { - yOffset = Y_STEP * 2 - break - } - case (yOffset === Y_STEP * 2): { - yOffset = Y_STEP * 1 + 1 - break - } - case (yOffset === Y_STEP * 1 + 1): { - yOffset = Y_STEP * 0 + 1 - break - } - case (yOffset === Y_STEP * 0 + 1): { - yOffset = -Y_STEP - break - } - case (yOffset === -Y_STEP): { - yOffset = 0 - break - } + function arrangeNodes(nodes, yLevel, yStep) { + /* + Here we will change the Y position of all profiles so that they are all at the same level. + */ + const X_STEP = SPACE_WIDTH / (nodes.length + 1) + + let xOffset = X_STEP + let yOffset = 0 + + for (let i = 0; i < nodes.length; i++) { + nodes[i].payload.floatingObject.container.frame.position.x = xOffset + xOffset = xOffset + X_STEP } - userProfiles[i].payload.floatingObject.container.frame.position.y = Y_LEVEL + yOffset - } - - for (let i = 0; i < userProfiles.length; i++) { - let userProfile = userProfiles[i] - if (userProfile.payload.floatingObject.isCollapsed !== true) { - userProfile.payload.floatingObject.collapseToggle() + for (let i = 0; i < nodes.length; i++) { + switch (true) { + case (yOffset === 0): { + yOffset = yStep + break + } + case (yOffset === yStep): { + yOffset = yStep * 2 + break + } + case (yOffset === yStep * 2): { + yOffset = yStep * 1 + 1 + break + } + case (yOffset === yStep * 1 + 1): { + yOffset = yStep * 0 + 1 + break + } + case (yOffset === yStep * 0 + 1): { + yOffset = -yStep + break + } + case (yOffset === -yStep): { + yOffset = 0 + break + } + } + nodes[i].payload.floatingObject.container.frame.position.y = yLevel + yOffset } } + /* Here we will setup the Reputation for each profile. */