diff --git a/Projects/Governance/Schemas/App-Schema/asset-vote.json b/Projects/Governance/Schemas/App-Schema/asset-vote.json index 6b2828f77..bc254bfb3 100644 --- a/Projects/Governance/Schemas/App-Schema/asset-vote.json +++ b/Projects/Governance/Schemas/App-Schema/asset-vote.json @@ -1,5 +1,5 @@ { - "type": "Asset Vote", + "type": "Asset Weight Vote", "menuItems": [ { "action": "Configure", @@ -38,6 +38,6 @@ "referencingRules": { "compatibleTypes": "->Asset Class->Asset->" }, - "propertyNameAtParent": "assetVotes", + "propertyNameAtParent": "assetWeightVotes", "icon": "EN" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/contribution-claims.json b/Projects/Governance/Schemas/App-Schema/contribution-claims.json index 34d781a96..2b98dcc43 100644 --- a/Projects/Governance/Schemas/App-Schema/contribution-claims.json +++ b/Projects/Governance/Schemas/App-Schema/contribution-claims.json @@ -42,7 +42,9 @@ "initialValues": { "config": "{\n\"codeName\": \"\"\n}" }, - "isTitleAllwaysVisible": false, + "attachingRules": { + "compatibleTypes": "->User Profile->" + }, "addLeftIcons": true, "level": 1, "propertyNameAtParent": "contributionClaims", diff --git a/Projects/Governance/Schemas/App-Schema/feature-vote.json b/Projects/Governance/Schemas/App-Schema/feature-vote.json index 35322a435..a919051b5 100644 --- a/Projects/Governance/Schemas/App-Schema/feature-vote.json +++ b/Projects/Governance/Schemas/App-Schema/feature-vote.json @@ -1,5 +1,5 @@ { - "type": "Feature Vote", + "type": "Feature Weight Vote", "menuItems": [ { "action": "Configure", @@ -37,6 +37,6 @@ "referencingRules": { "compatibleTypes": "->Feature Class->Feature->" }, - "propertyNameAtParent": "featureVotes", + "propertyNameAtParent": "featureWeightVotes", "icon": "github-api" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/ranking-vote.json b/Projects/Governance/Schemas/App-Schema/ranking-vote.json index c6f6cde4d..0a3cc724c 100644 --- a/Projects/Governance/Schemas/App-Schema/ranking-vote.json +++ b/Projects/Governance/Schemas/App-Schema/ranking-vote.json @@ -1,5 +1,5 @@ { - "type": "Position Vote", + "type": "Position Weight Vote", "menuItems": [ { "action": "Configure", @@ -36,6 +36,6 @@ "referencingRules": { "compatibleTypes": "->Team->Position->" }, - "propertyNameAtParent": "positionVotes", + "propertyNameAtParent": "positionWeightVotes", "icon": "bitfinex" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/user-vote.json b/Projects/Governance/Schemas/App-Schema/user-vote.json index df86346f5..90bc622b7 100644 --- a/Projects/Governance/Schemas/App-Schema/user-vote.json +++ b/Projects/Governance/Schemas/App-Schema/user-vote.json @@ -1,5 +1,5 @@ { - "type": "User Vote", + "type": "User Vote Transfer", "menuItems": [ { "action": "Configure", @@ -35,6 +35,6 @@ "referencingRules": { "compatibleTypes": "->User Profile->" }, - "propertyNameAtParent": "userVotes", + "propertyNameAtParent": "userVoteTransfers", "icon": "user-profile" } \ No newline at end of file diff --git a/Projects/Governance/Schemas/App-Schema/votes-distribution.json b/Projects/Governance/Schemas/App-Schema/votes-distribution.json index ddc718adf..cc428a388 100644 --- a/Projects/Governance/Schemas/App-Schema/votes-distribution.json +++ b/Projects/Governance/Schemas/App-Schema/votes-distribution.json @@ -38,8 +38,9 @@ "initialValues": { "config": "{\n\"codeName\": \"\"\n}" }, - "isTitleAllwaysVisible": false, - "isHierarchyHead": false, + "attachingRules": { + "compatibleTypes": "->User Profile->" + }, "addLeftIcons": true, "level": 1, "propertyNameAtParent": "votesDistribution", diff --git a/Projects/Governance/Schemas/App-Schema/votes-switch.json b/Projects/Governance/Schemas/App-Schema/votes-switch.json index 7d6687db2..24157b4d9 100644 --- a/Projects/Governance/Schemas/App-Schema/votes-switch.json +++ b/Projects/Governance/Schemas/App-Schema/votes-switch.json @@ -17,20 +17,20 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Position Vote", - "relatedUiObject": "Position Vote" + "label": "Add Position Weight Vote", + "relatedUiObject": "Position Weight Vote" }, { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Asset Vote", - "relatedUiObject": "Asset Vote" + "label": "Add Asset Weight Vote", + "relatedUiObject": "Asset Weight Vote" }, { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add Feature Vote", - "relatedUiObject": "Feature Vote" + "label": "Add Feature Weight Vote", + "relatedUiObject": "Feature Weight Vote" }, { "action": "Add UI Object", @@ -41,8 +41,8 @@ { "action": "Add UI Object", "actionFunction": "payload.executeAction", - "label": "Add User Vote", - "relatedUiObject": "User Vote" + "label": "Add User Vote Transfer", + "relatedUiObject": "User Vote Transfer" }, { "action": "Delete UI Object", @@ -74,15 +74,15 @@ "autoAdd": false }, { - "name": "assetVotes", + "name": "assetWeightVotes", "type": "array", - "childType": "Asset Vote", + "childType": "Asset Weight Vote", "autoAdd": false }, { - "name": "featureVotes", + "name": "featureWeightVotes", "type": "array", - "childType": "Feature Vote", + "childType": "Feature Weight Vote", "autoAdd": false }, { @@ -92,15 +92,15 @@ "autoAdd": false }, { - "name": "positionVotes", + "name": "positionWeightVotes", "type": "array", - "childType": "Position Vote", + "childType": "Position Weight Vote", "autoAdd": false }, { - "name": "userVotes", + "name": "userVoteTransfers", "type": "array", - "childType": "User Vote", + "childType": "User Vote Transfer", "autoAdd": false } ], diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index e1d2a174d..c25dce817 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -62,6 +62,7 @@ function newGovernanceUserProfileSpace() { } function resetVotingPower(node) { + if (node === undefined) { return } if (node.payload === undefined) { return } node.payload.votingPower = 0 /* @@ -117,6 +118,7 @@ function newGovernanceUserProfileSpace() { } function distributeVotingPower(node, votingPower) { + if (node === undefined) { return } if (node.payload === undefined) { return } node.payload.votingPower = node.payload.votingPower + votingPower drawVotingPower(node, node.payload.votingPower) @@ -175,7 +177,11 @@ function newGovernanceUserProfileSpace() { function drawVotingPower(node, votingPower) { votingPower = new Intl.NumberFormat().format(votingPower) + ' ' + 'SA' if (node.payload !== undefined) { - node.payload.uiObject.valueAtAngle = false + if (node.type === 'User Profile') { + return + } + node.payload.uiObject.valueAngleOffset = 180 + node.payload.uiObject.valueAtAngle = true node.payload.uiObject.setValue(votingPower) } } diff --git a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObject.js b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObject.js index c17d83b09..b239412ae 100644 --- a/Projects/Superalgos/UI/Spaces/Floating-Space/UiObject.js +++ b/Projects/Superalgos/UI/Spaces/Floating-Space/UiObject.js @@ -29,6 +29,7 @@ function newUiObject() { hasWarning: undefined, hasInfo: undefined, valueAtAngle: true, + valueAngleOffset: 0, run: run, stop: stop, heartBeat: heartBeat, @@ -1827,8 +1828,8 @@ function newUiObject() { x: position.x - getTextWidth(label) / 2, y: position.y } - labelPoint.x = labelPoint.x + radius * 7 / 3 * Math.cos(toRadians(thisObject.payload.angle)) - labelPoint.y = labelPoint.y + radius * 7 / 3 * Math.sin(toRadians(thisObject.payload.angle)) + labelPoint.x = labelPoint.x + radius * 7 / 3 * Math.cos(toRadians(thisObject.payload.angle + thisObject.valueAngleOffset)) + labelPoint.y = labelPoint.y + radius * 7 / 3 * Math.sin(toRadians(thisObject.payload.angle + thisObject.valueAngleOffset)) } else { if (thisObject.isOnFocus === true) { labelPoint = {