diff --git a/Projects/Governance/Icons/pool-class.png b/Projects/Governance/Icons/tokens-switch.png similarity index 100% rename from Projects/Governance/Icons/pool-class.png rename to Projects/Governance/Icons/tokens-switch.png diff --git a/Projects/Governance/Schemas/App-Schema/asset-class.json b/Projects/Governance/Schemas/App-Schema/asset-class.json index e8886ceb7..b81dc371e 100644 --- a/Projects/Governance/Schemas/App-Schema/asset-class.json +++ b/Projects/Governance/Schemas/App-Schema/asset-class.json @@ -42,7 +42,7 @@ "compatibleTypes": "->Assets->Asset Class->" }, "referencingRules": { - "compatibleTypes": "->Team->Position->" + "compatibleTypes": "->Position Class->Position->" }, "propertyNameAtParent": "assetClasses", "childrenNodesProperties": [ diff --git a/Projects/Governance/Schemas/App-Schema/contribution-claims.json b/Projects/Governance/Schemas/App-Schema/contribution-claims.json index 2b98dcc43..93b8bcf82 100644 --- a/Projects/Governance/Schemas/App-Schema/contribution-claims.json +++ b/Projects/Governance/Schemas/App-Schema/contribution-claims.json @@ -23,8 +23,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Time Contributions Folder", - "relatedUiObject": "Time Contributions Folder" + "label": "Add Position Contributions Folder", + "relatedUiObject": "Position Contributions Folder" }, { "action": "Delete UI Object", @@ -62,9 +62,9 @@ "autoAdd": false }, { - "name": "timeContributionsFolder", + "name": "positionContributionsFolder", "type": "array", - "childType": "Time Contributions Folder", + "childType": "Position Contributions Folder", "autoAdd": false } ], diff --git a/Projects/Governance/Schemas/App-Schema/feature-class.json b/Projects/Governance/Schemas/App-Schema/feature-class.json index 3e0b3d793..109110a9d 100644 --- a/Projects/Governance/Schemas/App-Schema/feature-class.json +++ b/Projects/Governance/Schemas/App-Schema/feature-class.json @@ -42,7 +42,7 @@ "compatibleTypes": "->Features->Feature Class->" }, "referencingRules": { - "compatibleTypes": "->Team->Position->" + "compatibleTypes": "->Position Class->Position->" }, "propertyNameAtParent": "featureClasses", "childrenNodesProperties": [ diff --git a/Projects/Governance/Schemas/App-Schema/governance-project.json b/Projects/Governance/Schemas/App-Schema/governance-project.json index 18228bc6c..cb0f41e9c 100644 --- a/Projects/Governance/Schemas/App-Schema/governance-project.json +++ b/Projects/Governance/Schemas/App-Schema/governance-project.json @@ -21,8 +21,8 @@ }, { "action": "Add UI Object", - "label": "Add Organization Chart", - "relatedUiObject": "Organization Chart", + "label": "Add Positions", + "relatedUiObject": "Positions", "actionFunction": "payload.executeAction" }, { diff --git a/Projects/Governance/Schemas/App-Schema/pool-class.json b/Projects/Governance/Schemas/App-Schema/pool-class.json index 8d525e812..84e4ff7b1 100644 --- a/Projects/Governance/Schemas/App-Schema/pool-class.json +++ b/Projects/Governance/Schemas/App-Schema/pool-class.json @@ -1,5 +1,5 @@ { - "type": "Pool Class", + "type": "Tokens Switch", "menuItems": [ { "action": "Configure", @@ -11,8 +11,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Pool Class", - "relatedUiObject": "Pool Class" + "label": "Add Tokens Switch", + "relatedUiObject": "Tokens Switch" }, { "action": "Add UI Object", @@ -39,17 +39,17 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Pools->Pool Class->" + "compatibleTypes": "->Pools->Tokens Switch->" }, "referencingRules": { - "compatibleTypes": "->Team->Position->" + "compatibleTypes": "->Position Class->Position->" }, - "propertyNameAtParent": "poolClasses", + "propertyNameAtParent": "tokensSwitches", "childrenNodesProperties": [ { - "name": "poolClasses", + "name": "tokensSwitches", "type": "array", - "childType": "Pool Class", + "childType": "Tokens Switch", "autoAdd": false }, { diff --git a/Projects/Governance/Schemas/App-Schema/pool-weight-vote.json b/Projects/Governance/Schemas/App-Schema/pool-weight-vote.json index d10f0e9a2..05a8deeeb 100644 --- a/Projects/Governance/Schemas/App-Schema/pool-weight-vote.json +++ b/Projects/Governance/Schemas/App-Schema/pool-weight-vote.json @@ -19,10 +19,8 @@ } ], "title": [ - "Use Reference Parent Parent Parent Parent", - "Use Reference Parent Parent Parent", - "Use Reference Parent Parent", - "Use Reference Parent" + "Use Reference Parent", + "Use Reference Parent Type" ], "editors": { "config": true @@ -36,7 +34,7 @@ "compatibleTypes": "->Votes Switch->" }, "referencingRules": { - "compatibleTypes": "->Pool Class->Pool->" + "compatibleTypes": "->Tokens Switch->Pool->" }, "propertyNameAtParent": "poolWeightVotes" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/pool.json b/Projects/Governance/Schemas/App-Schema/pool.json index 8d8919fb9..8eb58308d 100644 --- a/Projects/Governance/Schemas/App-Schema/pool.json +++ b/Projects/Governance/Schemas/App-Schema/pool.json @@ -11,8 +11,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Pool Class", - "relatedUiObject": "Pool Class" + "label": "Add Tokens Switch", + "relatedUiObject": "Tokens Switch" }, { "action": "Add UI Object", @@ -39,17 +39,17 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Pool Class->Pool->" + "compatibleTypes": "->Tokens Switch->Pool->" }, "referencingRules": { - "compatibleTypes": "->Organization Chart->Assets->Features->" + "compatibleTypes": "->Positions->Assets->Features->" }, "propertyNameAtParent": "pools", "childrenNodesProperties": [ { - "name": "poolClasses", + "name": "tokensSwitches", "type": "array", - "childType": "Pool Class", + "childType": "Tokens Switch", "autoAdd": false }, { diff --git a/Projects/Governance/Schemas/App-Schema/pools.json b/Projects/Governance/Schemas/App-Schema/pools.json index bdecce6f7..6f0c78625 100644 --- a/Projects/Governance/Schemas/App-Schema/pools.json +++ b/Projects/Governance/Schemas/App-Schema/pools.json @@ -11,8 +11,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Pool Class", - "relatedUiObject": "Pool Class" + "label": "Add Tokens Switch", + "relatedUiObject": "Tokens Switch" }, { "action": "Add UI Object", @@ -41,9 +41,9 @@ "level": 0, "childrenNodesProperties": [ { - "name": "poolClasses", + "name": "tokensSwitches", "type": "array", - "childType": "Pool Class", + "childType": "Tokens Switch", "autoAdd": false }, { diff --git a/Projects/Governance/Schemas/App-Schema/time-claim-vote.json b/Projects/Governance/Schemas/App-Schema/position-claim-vote.json similarity index 87% rename from Projects/Governance/Schemas/App-Schema/time-claim-vote.json rename to Projects/Governance/Schemas/App-Schema/position-claim-vote.json index 98e88627e..b77163f27 100644 --- a/Projects/Governance/Schemas/App-Schema/time-claim-vote.json +++ b/Projects/Governance/Schemas/App-Schema/position-claim-vote.json @@ -1,5 +1,5 @@ { - "type": "Time Claim Vote", + "type": "Position Claim Vote", "menuItems": [ { "action": "Configure", @@ -34,8 +34,8 @@ "compatibleTypes": "->Votes Switch->" }, "referencingRules": { - "compatibleTypes": "->Time Contribution Claim->" + "compatibleTypes": "->Position Contribution Claim->" }, - "propertyNameAtParent": "timeClaimVotes", + "propertyNameAtParent": "positionClaimVotes", "icon": "dogecoin" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/team.json b/Projects/Governance/Schemas/App-Schema/position-class.json similarity index 82% rename from Projects/Governance/Schemas/App-Schema/team.json rename to Projects/Governance/Schemas/App-Schema/position-class.json index ba78b6814..78c6c07d9 100644 --- a/Projects/Governance/Schemas/App-Schema/team.json +++ b/Projects/Governance/Schemas/App-Schema/position-class.json @@ -1,5 +1,5 @@ { - "type": "Team", + "type": "Position Class", "menuItems": [ { "action": "Configure", @@ -17,8 +17,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Team", - "relatedUiObject": "Team" + "label": "Add Position Class", + "relatedUiObject": "Position Class" }, { "action": "Delete UI Object", @@ -39,9 +39,9 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Position->Team->" + "compatibleTypes": "->Position->Position Class->" }, - "propertyNameAtParent": "teams", + "propertyNameAtParent": "positionClasss", "childrenNodesProperties": [ { "name": "positions", @@ -50,9 +50,9 @@ "autoAdd": false }, { - "name": "teams", + "name": "positionClasss", "type": "array", - "childType": "Team", + "childType": "Position Class", "autoAdd": false } ], diff --git a/Projects/Governance/Schemas/App-Schema/time-contribution-claim.json b/Projects/Governance/Schemas/App-Schema/position-contribution-claim.json similarity index 85% rename from Projects/Governance/Schemas/App-Schema/time-contribution-claim.json rename to Projects/Governance/Schemas/App-Schema/position-contribution-claim.json index 38560df9f..b6010510f 100644 --- a/Projects/Governance/Schemas/App-Schema/time-contribution-claim.json +++ b/Projects/Governance/Schemas/App-Schema/position-contribution-claim.json @@ -1,5 +1,5 @@ { - "type": "Time Contribution Claim", + "type": "Position Contribution Claim", "menuItems": [ { "action": "Configure", @@ -31,11 +31,11 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Time Contributions Folder->" + "compatibleTypes": "->Position Contributions Folder->" }, "referencingRules": { "compatibleTypes": "->Position->" }, - "propertyNameAtParent": "timeContributionClaims", + "propertyNameAtParent": "positionContributionClaims", "icon": "dogecoin" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/time-contributions-folder.json b/Projects/Governance/Schemas/App-Schema/position-contributions-folder.json similarity index 65% rename from Projects/Governance/Schemas/App-Schema/time-contributions-folder.json rename to Projects/Governance/Schemas/App-Schema/position-contributions-folder.json index 47ec677ce..8f449997c 100644 --- a/Projects/Governance/Schemas/App-Schema/time-contributions-folder.json +++ b/Projects/Governance/Schemas/App-Schema/position-contributions-folder.json @@ -1,5 +1,5 @@ { - "type": "Time Contributions Folder", + "type": "Position Contributions Folder", "menuItems": [ { "action": "Configure", @@ -11,14 +11,14 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Time Contributions Folder", - "relatedUiObject": "Time Contributions Folder" + "label": "Add Position Contributions Folder", + "relatedUiObject": "Position Contributions Folder" }, { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Time Contribution Claim", - "relatedUiObject": "Time Contribution Claim" + "label": "Add Position Contribution Claim", + "relatedUiObject": "Position Contribution Claim" }, { "action": "Delete UI Object", @@ -39,20 +39,20 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Contribution Claims->Time Contributions Folder->" + "compatibleTypes": "->Contribution Claims->Position Contributions Folder->" }, - "propertyNameAtParent": "timeContributionsFolder", + "propertyNameAtParent": "positionContributionsFolder", "childrenNodesProperties": [ { - "name": "timeContributionsFolder", + "name": "positionContributionsFolder", "type": "array", - "childType": "Time Contributions Folder", + "childType": "Position Contributions Folder", "autoAdd": false }, { - "name": "timeContributionClaims", + "name": "positionContributionClaims", "type": "array", - "childType": "Time Contribution Claim", + "childType": "Position Contribution Claim", "autoAdd": false } ], diff --git a/Projects/Governance/Schemas/App-Schema/position-weight-vote.json b/Projects/Governance/Schemas/App-Schema/position-weight-vote.json index 0a3cc724c..c1cb72fc8 100644 --- a/Projects/Governance/Schemas/App-Schema/position-weight-vote.json +++ b/Projects/Governance/Schemas/App-Schema/position-weight-vote.json @@ -34,7 +34,7 @@ "compatibleTypes": "->Votes Switch->" }, "referencingRules": { - "compatibleTypes": "->Team->Position->" + "compatibleTypes": "->Position Class->Position->" }, "propertyNameAtParent": "positionWeightVotes", "icon": "bitfinex" diff --git a/Projects/Governance/Schemas/App-Schema/position.json b/Projects/Governance/Schemas/App-Schema/position.json index e1bdf712b..36a2bcac5 100644 --- a/Projects/Governance/Schemas/App-Schema/position.json +++ b/Projects/Governance/Schemas/App-Schema/position.json @@ -17,8 +17,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Team", - "relatedUiObject": "Team" + "label": "Add Position Class", + "relatedUiObject": "Position Class" }, { "action": "Delete UI Object", @@ -39,7 +39,7 @@ "addLeftIcons": true, "level": 2, "attachingRules": { - "compatibleTypes": "->Organization Chart->Position->Team->" + "compatibleTypes": "->Positions->Position->Position Class->" }, "propertyNameAtParent": "positions", "childrenNodesProperties": [ @@ -50,9 +50,9 @@ "autoAdd": false }, { - "name": "teams", + "name": "positionClasss", "type": "array", - "childType": "Team", + "childType": "Position Class", "autoAdd": false } ], diff --git a/Projects/Governance/Schemas/App-Schema/organization-chart.json b/Projects/Governance/Schemas/App-Schema/positions.json similarity index 83% rename from Projects/Governance/Schemas/App-Schema/organization-chart.json rename to Projects/Governance/Schemas/App-Schema/positions.json index 7b4146af4..f8b062da9 100644 --- a/Projects/Governance/Schemas/App-Schema/organization-chart.json +++ b/Projects/Governance/Schemas/App-Schema/positions.json @@ -1,11 +1,11 @@ { - "type": "Organization Chart", + "type": "Positions", "menuItems": [ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Team", - "relatedUiObject": "Team" + "label": "Add Position Class", + "relatedUiObject": "Position Class" }, { "action": "Add UI Object", @@ -28,9 +28,9 @@ "level": 0, "childrenNodesProperties": [ { - "name": "teams", + "name": "positionClasss", "type": "array", - "childType": "Team", + "childType": "Position Class", "autoAdd": false }, { diff --git a/Projects/Governance/Schemas/App-Schema/votes-switch.json b/Projects/Governance/Schemas/App-Schema/votes-switch.json index 316420ac6..4f4c0fd66 100644 --- a/Projects/Governance/Schemas/App-Schema/votes-switch.json +++ b/Projects/Governance/Schemas/App-Schema/votes-switch.json @@ -14,6 +14,12 @@ "label": "Add Votes Switch", "relatedUiObject": "Votes Switch" }, + { + "action": "Add UI Object", + "actionFunction": "payload.executeAction", + "label": "Add Pool Weight Vote", + "relatedUiObject": "Pool Weight Vote" + }, { "action": "Add UI Object", "actionFunction": "payload.executeAction", @@ -35,8 +41,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Time Claim Vote", - "relatedUiObject": "Time Claim Vote" + "label": "Add Position Claim Vote", + "relatedUiObject": "Position Claim Vote" }, { "action": "Add UI Object", @@ -85,6 +91,12 @@ "childType": "Votes Switch", "autoAdd": false }, + { + "name": "poolWeightVotes", + "type": "array", + "childType": "Pool Weight Vote", + "autoAdd": false + }, { "name": "assetWeightVotes", "type": "array", @@ -98,9 +110,9 @@ "autoAdd": false }, { - "name": "timeClaimVotes", + "name": "positionClaimVotes", "type": "array", - "childType": "Time Claim Vote", + "childType": "Position Claim Vote", "autoAdd": false }, { diff --git a/Projects/Governance/UI/Spaces/Features-Space/Features.js b/Projects/Governance/UI/Spaces/Features-Space/Features.js index 2f67fa2e5..3573a4dca 100644 --- a/Projects/Governance/UI/Spaces/Features-Space/Features.js +++ b/Projects/Governance/UI/Spaces/Features-Space/Features.js @@ -1,4 +1,4 @@ -function newGovernanceUserFeaturesSpace() { +function newGovernanceFeaturesSpace() { const MODULE_NAME = 'Features Space' let thisObject = { diff --git a/Projects/Governance/UI/Spaces/Pools-Space/Pools.js b/Projects/Governance/UI/Spaces/Pools-Space/Pools.js new file mode 100644 index 000000000..d4fc6b3ae --- /dev/null +++ b/Projects/Governance/UI/Spaces/Pools-Space/Pools.js @@ -0,0 +1,185 @@ +function newGovernancePoolsSpace() { + const MODULE_NAME = 'Pool Space' + + let thisObject = { + container: undefined, + physics: physics, + draw: draw, + getContainer: getContainer, + finalize: finalize, + initialize: initialize + } + + thisObject.container = newContainer() + thisObject.container.initialize(MODULE_NAME) + + return thisObject + + function initialize() { + + } + + function finalize() { + thisObject.container.finalize() + thisObject.container = undefined + } + + function getContainer(point) { + + if (thisObject.container.frame.isThisPointHere(point, true) === true) { + thisObject.container.space = MODULE_NAME + return thisObject.container + } else { + return undefined + } + } + + function physics() { + if (UI.projects.superalgos.spaces.designSpace.workspace === undefined) { return } + + let pools = UI.projects.superalgos.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('Pools') + + /* + We will first reset all the token flows, and then distribute it. + */ + for (let i = 0; i < pools.length; i++) { + let poolsNode = pools[i] + poolsReset(poolsNode) + } + for (let i = 0; i < pools.length; i++) { + let poolsNode = pools[i] + poolsDistribute(poolsNode) + } + } + + function poolsReset(pools) { + resetTokenFlow(pools) + } + + function poolsDistribute(pools) { + let tokenFlow = UI.projects.superalgos.utilities.nodeConfig.loadPropertyFromNodeConfig(pools.payload, 'tokens') + distributeTokenFlow(pools, tokenFlow) + } + + function resetTokenFlow(node) { + if (node === undefined) { return } + if (node.payload === undefined) { return } + node.payload.tokenFlow = 0 + /* + If there is a reference parent defined, this means that the token flow is + transfered to it and not distributed among children. + */ + if (node.payload.referenceParent !== undefined) { + resetTokenFlow(node.payload.referenceParent) + return + } + /* + When we reach certain node types, we will halt the distribution, because thse are targets for + token flow. + */ + if ( + node.type === 'Position' || + node.type === 'Asset' || + node.type === 'Feature' + ) { return } + /* + If there is no reference parent we will redistribute token flow among children. + */ + let schemaDocument = getSchemaDocument(node) + if (schemaDocument === undefined) { return } + + if (schemaDocument.childrenNodesProperties !== undefined) { + for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) { + let property = schemaDocument.childrenNodesProperties[i] + + switch (property.type) { + case 'node': { + if (node.type === 'Pools' && property.name === "votesDistribution") { + let childNode = node[property.name] + resetTokenFlow(childNode) + } + } + break + case 'array': { + let propertyArray = node[property.name] + if (propertyArray !== undefined) { + for (let m = 0; m < propertyArray.length; m++) { + let childNode = propertyArray[m] + resetTokenFlow(childNode) + } + } + break + } + } + } + } + } + + function distributeTokenFlow(node, tokenFlow) { + if (node === undefined) { return } + if (node.payload === undefined) { return } + node.payload.tokenFlow = node.payload.tokenFlow + tokenFlow + drawTokenFlow(node, node.payload.tokenFlow) + /* + If there is a reference parent defined, this means that the token flow is + transfered to it and not distributed among children. + */ + if (node.payload.referenceParent !== undefined) { + distributeTokenFlow(node.payload.referenceParent, tokenFlow) + return + } + /* + When we reach certain node types, we will halt the distribution, because thse are targets for + token flow. + */ + if ( + node.type === 'Asset' || + node.type === 'Feature' + ) { return } + /* + If there is no reference parent we will redistribute token flow among children. + */ + let schemaDocument = getSchemaDocument(node) + if (schemaDocument === undefined) { return } + + if (schemaDocument.childrenNodesProperties !== undefined) { + for (let i = 0; i < schemaDocument.childrenNodesProperties.length; i++) { + let property = schemaDocument.childrenNodesProperties[i] + + switch (property.type) { + case 'node': { + if (node.type === 'Pools' && property.name === "votesDistribution") { + let childNode = node[property.name] + distributeTokenFlow(childNode, tokenFlow) + } + } + break + case 'array': { + let propertyArray = node[property.name] + if (propertyArray !== undefined) { + for (let m = 0; m < propertyArray.length; m++) { + let childNode = propertyArray[m] + distributeTokenFlow(childNode, tokenFlow / propertyArray.length) + } + } + break + } + } + } + } + } + + function drawTokenFlow(node, tokenFlow) { + tokenFlow = new Intl.NumberFormat().format(tokenFlow) + ' ' + 'SA Tokens' + if (node.payload !== undefined) { + if (node.type === 'Pools') { + return + } + node.payload.uiObject.setStatus(tokenFlow) + } + } + + function draw() { + + } +} diff --git a/Projects/Governance/UI/Spaces/Ranking-Space/Ranking.js b/Projects/Governance/UI/Spaces/Positions-Space/Positions.js similarity index 90% rename from Projects/Governance/UI/Spaces/Ranking-Space/Ranking.js rename to Projects/Governance/UI/Spaces/Positions-Space/Positions.js index f797e8ac4..f6407b32c 100644 --- a/Projects/Governance/UI/Spaces/Ranking-Space/Ranking.js +++ b/Projects/Governance/UI/Spaces/Positions-Space/Positions.js @@ -1,5 +1,5 @@ -function newGovernanceRankingSpace() { - const MODULE_NAME = 'Ranking Space' +function newGovernancePositionsSpace() { + const MODULE_NAME = 'Positions Space' let thisObject = { container: undefined, @@ -27,7 +27,7 @@ function newGovernanceRankingSpace() { } function physics() { - + } function getContainer(point) { diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index c25dce817..8fe109aa6 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -175,13 +175,28 @@ function newGovernanceUserProfileSpace() { } function drawVotingPower(node, votingPower) { - votingPower = new Intl.NumberFormat().format(votingPower) + ' ' + 'SA' + votingPower = new Intl.NumberFormat().format(votingPower) + ' ' + 'Votes' if (node.payload !== undefined) { if (node.type === 'User Profile') { return } - node.payload.uiObject.valueAngleOffset = 180 - node.payload.uiObject.valueAtAngle = true + if ( + node.type === 'Position' || + node.type === 'Position Class' || + node.type === 'Pool' || + node.type === 'Tokens Switch' || + node.type === 'Asset' || + node.type === 'Asset Class' || + node.type === 'Feature' || + node.type === 'Feature Class' + ) { + node.payload.uiObject.valueAngleOffset = 0 + node.payload.uiObject.valueAtAngle = false + } else{ + node.payload.uiObject.valueAngleOffset = 180 + node.payload.uiObject.valueAtAngle = true + } + node.payload.uiObject.setValue(votingPower) } } diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index fdd264d2c..36299a81c 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -1036,10 +1036,10 @@ "onMouseDownIndex": 1 }, { - "name": "User Features Space", - "folderName": "User-Features-Space", - "propertyName": "userFeaturesSpace", - "functionName": "newGovernanceUserFeaturesSpace", + "name": "Features Space", + "folderName": "Features-Space", + "propertyName": "featuresSpace", + "functionName": "newGovernanceFeaturesSpace", "initializationIndex": 2, "animationPhysicsIndex": 2, "animationDrawIndex": 2, @@ -1049,10 +1049,10 @@ "onMouseDownIndex": 2 }, { - "name": "Ranking Space", - "folderName": "Ranking-Space", - "propertyName": "rankingSpace", - "functionName": "newGovernanceRankingSpace", + "name": "Positions Space", + "folderName": "Positions-Space", + "propertyName": "positionsSpace", + "functionName": "newGovernancePositionsSpace", "initializationIndex": 3, "animationPhysicsIndex": 3, "animationDrawIndex": 3, @@ -1060,6 +1060,19 @@ "onMouseOverIndex": 3, "onMouseClickIndex": 3, "onMouseDownIndex": 3 + }, + { + "name": "Pools Space", + "folderName": "Pools-Space", + "propertyName": "poolsSpace", + "functionName": "newGovernancePoolsSpace", + "initializationIndex": 4, + "animationPhysicsIndex": 4, + "animationDrawIndex": 4, + "onMouseWheelIndex": 4, + "onMouseOverIndex": 4, + "onMouseClickIndex": 4, + "onMouseDownIndex": 4 } ] },