diff --git a/Projects/Foundations/Schemas/App-Schema/space-settings.json b/Projects/Foundations/Schemas/App-Schema/space-settings.json index 4607dbca5..079349f18 100644 --- a/Projects/Foundations/Schemas/App-Schema/space-settings.json +++ b/Projects/Foundations/Schemas/App-Schema/space-settings.json @@ -9,7 +9,7 @@ "config": true }, "initialValues": { - "config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false,\"detachUsingMouse\":false }" + "config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false,\"shortcuts\":{\"toggleMapMode\":\"M\",\"toggleDrawRelationshipLines\":\"R\",\"toggleDrawParentLines\":\"C\",\"saveWorkspace\":\"S\",\"adjustAspectRatio\":\"A\"}}" }, "menuItems": [ { diff --git a/Projects/Foundations/Schemas/Docs-Nodes/S/Space/Space-Settings/space-settings.json b/Projects/Foundations/Schemas/Docs-Nodes/S/Space/Space-Settings/space-settings.json index 704cea2c2..3d22433a6 100644 --- a/Projects/Foundations/Schemas/Docs-Nodes/S/Space/Space-Settings/space-settings.json +++ b/Projects/Foundations/Schemas/Docs-Nodes/S/Space/Space-Settings/space-settings.json @@ -59,6 +59,43 @@ { "style": "List", "text": "detachUsingMouse defines if you can detach nodes from it's parent or reference parents only using the mouse (when true) or if you can not use the mouse for that and can only do it using the detach buttons on the icon's menu (when false)." + }, + { + "style": "Subtitle", + "text": "Shorcut Properties" + }, + { + "style": "Text", + "text": "Shorcuts are key stroke combinations that helps users execute certain actions very quickly. To execute a shorcut users need to simultaniously press CTRL + SHIFT + a pre-defined key.", + "updated": 1625419324367 + }, + { + "style": "Success", + "text": "Shorcuts default values an be seen below. You can modify those values by changing the Config Properties listed below." + }, + { + "style": "List", + "text": "toggleMapMode defines which letter will be used as a Shorcut of entering and leaving the Map Mode." + }, + { + "style": "List", + "text": "toggleDrawRelationshipLines defines which letter will be used as a Shorcut for turning on and off the drawing of Reference Lines.", + "updated": 1625419127491 + }, + { + "style": "List", + "text": "toggleDrawParentLines defines which letter will be used as a Shorcut for turning on and off the drawing of Parent Lines.", + "updated": 1625419130924 + }, + { + "style": "List", + "text": "saveWorkspace defines which letter will be used as a Shorcut for saving the Workspace .", + "updated": 1625419134674 + }, + { + "style": "List", + "text": "adjustAspectRation defines which letter will be used as a Shorcut for forcing a Time Machine to adjust it's aspect ratio according to the size of the screen a user currently have.", + "updated": 1625419123375 } ] } \ No newline at end of file diff --git a/Projects/Foundations/UI/Spaces/Charting-Space/EdgeEditor.js b/Projects/Foundations/UI/Spaces/Charting-Space/EdgeEditor.js index ee39b9429..7ecc06ff7 100644 --- a/Projects/Foundations/UI/Spaces/Charting-Space/EdgeEditor.js +++ b/Projects/Foundations/UI/Spaces/Charting-Space/EdgeEditor.js @@ -186,9 +186,9 @@ function newEdgeEditor() { function onKeyPressed(event, forceExecution) { if (forceExecution !== true) { - if (whereIsMouseOver !== 'center' ) {return} + if (whereIsMouseOver !== 'center') { return } } - + const STEP = 10 if (event.shiftKey === false && event.ctrlKey === false && event.code === 'ArrowLeft') { @@ -228,7 +228,11 @@ function newEdgeEditor() { return } - if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'A' || event.key === 'a')) { + if ( + event.shiftKey === true && + (event.ctrlKey === true || event.metaKey === true) && + (event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.adjustAspectRatio || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.adjustAspectRatio.toLowerCase()) + ) { resetAspectRatio() return } diff --git a/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js b/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js index d0808189e..f5fc08ef5 100644 --- a/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js +++ b/Projects/Foundations/UI/Spaces/Floating-Space/FloatingSpace.js @@ -100,7 +100,14 @@ function newFoundationsFloatingSpace() { } }, physics: true, - detachUsingMouse: false + detachUsingMouse: false, + shortcuts: { + toggleMapMode: "M", + toggleDrawRelationshipLines: "R", + toggleDrawParentLines: "C", + saveWorkspace: "S", + adjustAspectRatio: "A" + } } return thisObject @@ -540,6 +547,23 @@ function newFoundationsFloatingSpace() { if (configSettings.detachUsingMouse !== undefined) { thisObject.settings.detachUsingMouse = configSettings.detachUsingMouse } + if (configSettings.shortcuts !== undefined) { + if (configSettings.shortcuts.toggleMapMode !== undefined) { + thisObject.settings.shortcuts.toggleMapMode = configSettings.shortcuts.toggleMapMode + } + if (configSettings.shortcuts.toggleDrawRelationshipLines !== undefined) { + thisObject.settings.shortcuts.toggleDrawRelationshipLines = configSettings.shortcuts.toggleDrawRelationshipLines + } + if (configSettings.shortcuts.toggleDrawParentLines !== undefined) { + thisObject.settings.shortcuts.toggleDrawParentLines = configSettings.shortcuts.toggleDrawParentLines + } + if (configSettings.shortcuts.saveWorkspace !== undefined) { + thisObject.settings.shortcuts.saveWorkspace = configSettings.shortcuts.saveWorkspace + } + if (configSettings.shortcuts.adjustAspectRatio !== undefined) { + thisObject.settings.shortcuts.adjustAspectRatio = configSettings.shortcuts.adjustAspectRatio + } + } } function positionContraintsPhysics() { diff --git a/Projects/Governance/Plugins/Workspaces/Token-Distribution-Superalgos.json b/Projects/Governance/Plugins/Workspaces/Token-Distribution-Superalgos.json index a98182435..f5711b5ff 100644 --- a/Projects/Governance/Plugins/Workspaces/Token-Distribution-Superalgos.json +++ b/Projects/Governance/Plugins/Workspaces/Token-Distribution-Superalgos.json @@ -1,7 +1,7 @@ { "type": "Workspace", "name": "Token-Distribution-Superalgos", - "config": "{\n \"docsLanguage\": \"EN\",\n \"currentBranch\": \"develop\",\n \"contributionsBranch\": \"develop\"\n}", + "config": "{\n \"docsLanguage\": \"EN\",\n \"contributionsBranch\": \"develop\"\n}", "rootNodes": [ { "type": "Design Space", @@ -148,7 +148,7 @@ "spaceSettings": { "type": "Space Settings", "name": "New Space Settings", - "config": "{\n \"indexContent\": true\n}", + "config": "{\n \"indexContent\": false\n}", "project": "Foundations", "id": "4124c674-c5fe-41d9-94b9-d669753188b7", "savedPayload": { @@ -782,7 +782,7 @@ { "type": "Plugin File", "name": "harrellbm", - "config": "{\"project\":\"Governance\",\"fileName\":\"harrellbm\",\"folderName\":\"User-Profiles\",\"nodeType\":\"User Profile\"}", + "config": "{\n \"project\": \"Governance\",\n \"fileName\": \"harrellbm\",\n \"folderName\": \"User-Profiles\",\n \"nodeType\": \"User Profile\"\n}", "project": "Foundations", "pluginFilePosition": { "type": "Plugin File Position", @@ -824,7 +824,7 @@ "floatingObject": { "isPinned": false, "isFrozen": false, - "isCollapsed": false, + "isCollapsed": true, "angleToParent": 2, "distanceToParent": 3, "arrangementStyle": 0 @@ -1364,7 +1364,7 @@ "githubAPI": { "type": "Github API", "name": "New Github API", - "config": "{\n \"username\": \"Luis-Fernando-Molina\",\n \"token\": \"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\"\n}", + "config": "{\n \"username\": \"\",\n \"token\": \"\"\n}", "project": "Foundations", "id": "90d121ab-9f19-4437-a051-1222287085fc", "savedPayload": { diff --git a/UI/Canvas.js b/UI/Canvas.js index 19dea6d81..4c07da82b 100644 --- a/UI/Canvas.js +++ b/UI/Canvas.js @@ -415,25 +415,41 @@ function newCanvas() { UI.projects.foundations.spaces.floatingSpace.exitMapMode() } - if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'M' || event.key === 'm')) { + if ( + event.shiftKey === true && + (event.ctrlKey === true || event.metaKey === true) && + (event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.toggleMapMode || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.toggleMapMode.toLowerCase()) + ) { UI.projects.foundations.spaces.floatingSpace.toggleMapMode() event.preventDefault() return } - if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'R' || event.key === 'r')) { + if ( + event.shiftKey === true && + (event.ctrlKey === true || event.metaKey === true) && + (event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.toggleDrawRelationshipLines || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.toggleDrawRelationshipLines.toLowerCase()) + ) { UI.projects.foundations.spaces.floatingSpace.toggleDrawReferenceLines() event.preventDefault() return } - if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'C' || event.key === 'c')) { + if ( + event.shiftKey === true && + (event.ctrlKey === true || event.metaKey === true) && + (event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.toggleDrawParentLines || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.toggleDrawParentLines.toLowerCase()) + ) { UI.projects.foundations.spaces.floatingSpace.toggleDrawChainLines() event.preventDefault() return } - if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'S' || event.key === 's')) { + if ( + event.shiftKey === true && + (event.ctrlKey === true || event.metaKey === true) && + (event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.saveWorkspace || event.key === UI.projects.foundations.spaces.floatingSpace.settings.shortcuts.saveWorkspace.toLowerCase()) + ) { UI.projects.foundations.spaces.designSpace.workspace.save() if (event.preventDefault !== undefined) { event.preventDefault()