Plotting Improvements

This commit is contained in:
Luis Fernando Molina committed 2021-05-29 21:47:01 +02:00
1 parent c7534a3a8e
commit 1538ab7f47
7 files changed
+38 -40

No files matched your search

@@ -1 +1 @@
{"type":"API Map","name":"Messari","config":"{\n \"codeName\": \"Messari\",\n \"protocol\": \"https\",\n \"hostName\": \"data.messari.io\",\n \"portNumber\": \"\",\n \"path\": \"api\",\n \"millisecondsBetweenCalls\": 4000\n}","project":"Superalgos","apiVersions":[{"type":"API Version","name":"Version 1","config":"{\n \"codeName\": \"v1\"\n}","project":"Superalgos","apiEndpoints":[{"type":"API Endpoint","name":"Get All News","config":"{\n \"codeName\": \"news\"\n}","project":"Superalgos","apiQueryParameters":{"type":"API Query Parameters","name":"New API Query Parameters","config":"{\n \"codeName\": \"\"\n}","project":"Superalgos","apiQueryParameters":[{"type":"API Query Parameter","name":"Page","config":"{\n \"codeName\": \"page\",\n \"isString\": false,\n \"isOptional\": false,\n \"description\": \"Page number, starts at 1. Increment to paginate through results (until result is empty array)\",\n \"isPageNumber\": true\n}","project":"Superalgos","id":"754e2724-36bc-4e4e-94cf-bfba88dadd3b","savedPayload":{"position":{"x":14018.222252113279,"y":10179.489044198583},"targetPosition":{"x":14308,"y":10257.134757729338},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"API Query Parameter","name":"Fields","config":"{\n \"codeName\": \"fields\",\n \"isString\": true,\n \"isOptional\": true,\n \"description\": \"pare down the returned fields (comma , separated, drill down with a slash /)\"\n}","project":"Superalgos","id":"3199c37c-5ecc-47fd-8868-eddaa15fdc59","savedPayload":{"position":{"x":14158,"y":9997.327136594007},"targetPosition":{"x":14308,"y":10257.134757729338},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"API Query Parameter","name":"As Markdown","config":"{\n \"codeName\": \"as-markdown\",\n \"isString\": false,\n \"isOptional\": true,\n \"description\": \"formatting (other than HTML links) is hidden. Use this query param to return content with markdown syntax\"\n}","project":"Superalgos","id":"fa87b1ad-2d0f-4462-85fb-524630e9db7a","savedPayload":{"position":{"x":14385.645713530756,"y":9967.357009842617},"targetPosition":{"x":14308,"y":10257.134757729338},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"03f8b00d-10cf-423d-a654-d8db598c76a9","savedPayload":{"position":{"x":14308,"y":10257.134757729338},"targetPosition":{"x":14458,"y":10516.942378864669},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"apiQueryResponses":{"type":"API Query Responses","name":"New API Query Responses","config":"{\n \"codeName\": \"\"\n}","project":"Superalgos","apiQueryResponses":[{"type":"API Query Response","name":"200 Successful","config":"{\n \"codeName\": \"200\"\n}","project":"Superalgos","apiResponseSchema":{"type":"API Response Schema","name":"New API Response Schema","config":"{\n \"nodePath\": \"apiResponseReceivedObject.data\"\n}","project":"Superalgos","apiResponseFields":{"type":"API Response Field","name":"Root Object","config":"{\n \"codeName\": \"Root-Object\",\n \"fieldType\": \"object\",\n \"descrption\": \"This is the root object of the API response.\"\n}","project":"Superalgos","apiResponseFields":[{"type":"API Response Field","name":"Status","config":"{\n \"codeName\": \"status\",\n \"fieldType\": \"object\",\n \"descrption\": \"object (ApiStatus)\"\n}","project":"Superalgos","apiResponseFields":[{"type":"API Response Field","name":"Enlapsed","config":"{\n \"codeName\": \"enlapsed\",\n \"fieldType\": \"number\",\n \"descrption\": \"\"\n}","project":"Superalgos","apiResponseFields":[],"id":"9c472348-ac24-4567-a36f-8600a1fac914","savedPayload":{"position":{"x":14957.080319710783,"y":9159.037626303341},"targetPosition":{"x":15126.07633712987,"y":9406.90925859814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"API Response Field","name":"Timestamp","config":"{\n \"codeName\": \"timestamp\",\n \"fieldType\": \"date\",\n \"descrption\": \"\"\n}","project":"Superalgos","apiResponseFields":[],"id":"12b796fd-85eb-49b2-a88e-b400f52cc5e9","savedPayload":{"position":{"x":15256.241458865137,"y":9136.618598227415},"targetPosition":{"x":15126.07633712987,"y":9406.90925859814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"5d45e7d6-8964-449e-8f34-c7f5f4839d54","savedPayload":{"position":{"x":15126.07633712987,"y":9406.9092585Line truncated
{"type":"API Map","name":"Messari","config":"{\n \"codeName\": \"Messari\",\n \"protocol\": \"https\",\n \"hostName\": \"data.messari.io\",\n \"portNumber\": \"\",\n \"path\": \"api\",\n \"millisecondsBetweenCalls\": 4000\n}","project":"Superalgos","apiVersions":[{"type":"API Version","name":"Version 1","config":"{\n \"codeName\": \"v1\"\n}","project":"Superalgos","apiEndpoints":[{"type":"API Endpoint","name":"Get All News","config":"{\n \"codeName\": \"news\"\n}","project":"Superalgos","apiQueryParameters":{"type":"API Query Parameters","name":"New API Query Parameters","config":"{\n \"codeName\": \"\"\n}","project":"Superalgos","apiQueryParameters":[{"type":"API Query Parameter","name":"Page","config":"{\n \"codeName\": \"page\",\n \"isString\": false,\n \"isOptional\": false,\n \"description\": \"Page number, starts at 1. Increment to paginate through results (until result is empty array)\",\n \"isPageNumber\": true\n}","project":"Superalgos","id":"754e2724-36bc-4e4e-94cf-bfba88dadd3b","savedPayload":{"position":{"x":14012.485238430854,"y":10170.798147156756},"targetPosition":{"x":14302.262986317575,"y":10248.443860687512},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"API Query Parameter","name":"Fields","config":"{\n \"codeName\": \"fields\",\n \"isString\": true,\n \"isOptional\": true,\n \"description\": \"pare down the returned fields (comma , separated, drill down with a slash /)\"\n}","project":"Superalgos","id":"3199c37c-5ecc-47fd-8868-eddaa15fdc59","savedPayload":{"position":{"x":14152.262986317575,"y":9988.636239552181},"targetPosition":{"x":14302.262986317575,"y":10248.443860687512},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"API Query Parameter","name":"As Markdown","config":"{\n \"codeName\": \"as-markdown\",\n \"isString\": false,\n \"isOptional\": true,\n \"description\": \"formatting (other than HTML links) is hidden. Use this query param to return content with markdown syntax\"\n}","project":"Superalgos","id":"fa87b1ad-2d0f-4462-85fb-524630e9db7a","savedPayload":{"position":{"x":14379.90869984833,"y":9958.66611280079},"targetPosition":{"x":14302.262986317575,"y":10248.443860687512},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"03f8b00d-10cf-423d-a654-d8db598c76a9","savedPayload":{"position":{"x":14302.262986317575,"y":10248.443860687512},"targetPosition":{"x":14452.262986317575,"y":10508.251481822843},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"apiQueryResponses":{"type":"API Query Responses","name":"New API Query Responses","config":"{\n \"codeName\": \"\"\n}","project":"Superalgos","apiQueryResponses":[{"type":"API Query Response","name":"200 Successful","config":"{\n \"codeName\": \"200\"\n}","project":"Superalgos","apiResponseSchema":{"type":"API Response Schema","name":"New API Response Schema","config":"{\n \"nodePath\": \"apiResponseReceivedObject.data\"\n}","project":"Superalgos","apiResponseFields":{"type":"API Response Field","name":"Root Object","config":"{\n \"codeName\": \"Root-Object\",\n \"fieldType\": \"object\",\n \"descrption\": \"This is the root object of the API response.\"\n}","project":"Superalgos","apiResponseFields":[{"type":"API Response Field","name":"Status","config":"{\n \"codeName\": \"status\",\n \"fieldType\": \"object\",\n \"descrption\": \"object (ApiStatus)\"\n}","project":"Superalgos","apiResponseFields":[{"type":"API Response Field","name":"Enlapsed","config":"{\n \"codeName\": \"enlapsed\",\n \"fieldType\": \"number\",\n \"descrption\": \"\"\n}","project":"Superalgos","apiResponseFields":[],"id":"9c472348-ac24-4567-a36f-8600a1fac914","savedPayload":{"position":{"x":14951.343306028359,"y":9150.346729261515},"targetPosition":{"x":15120.339323447446,"y":9398.218361556314},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"API Response Field","name":"Timestamp","config":"{\n \"codeName\": \"timestamp\",\n \"fieldType\": \"date\",\n \"descrption\": \"\"\n}","project":"Superalgos","apiResponseFields":[],"id":"12b796fd-85eb-49b2-a88e-b400f52cc5e9","savedPayload":{"position":{"x":15250.504445182713,"y":9127.927701185588},"targetPosition":{"x":15120.339323447446,"y":9398.218361556314},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"5d45e7d6-8964-449e-8f34-Line truncated
@@ -9,7 +9,7 @@
"compatibleTypes": "->Plotter Panel->"
},
"initialValues": {
"config": "{\n \"valueDecimals\": 2\n}"
"config": "{\n \"valueDecimals\": 10\n}"
},
"childrenNodesProperties": [
{
@@ -10,6 +10,7 @@
"compatibleTypes": "->Polygon->"
},
"title": [
"Use Reference Parent Parent",
"Use Reference Parent"
],
"menuItems": [
@@ -12,7 +12,7 @@
let fileStorage = TS.projects.superalgos.taskModules.fileStorage.newFileStorage(processIndex)
let statusDependencies
let statusDependenciesModule
let dataDependenciesModule
let dataFiles = new Map
let indicatorOutputModule
@@ -21,9 +21,9 @@
return thisObject;
function initialize(pStatusDependencies, pDataDependencies, callBackFunction) {
statusDependencies = pStatusDependencies;
dataDependenciesModule = pDataDependencies;
function initialize(pStatusDependencies, pStatusDependenciesModule, callBackFunction) {
statusDependenciesModule = pStatusDependencies;
dataDependenciesModule = pStatusDependenciesModule;
indicatorOutputModule = TS.projects.superalgos.botModules.indicatorOutput.newSuperalgosBotModulesIndicatorOutput(processIndex)
indicatorOutputModule.initialize(callBackFunction)
@@ -31,7 +31,7 @@
function finalize() {
dataFiles = undefined
statusDependencies = undefined
statusDependenciesModule = undefined
dataDependenciesModule = undefined
indicatorOutputModule = undefined
fileStorage = undefined
@@ -60,7 +60,7 @@
/*
We look first for the bot who knows the begining of the market in order to get when the market starts.
*/
statusReport = statusDependencies.reportsByMainUtility.get("Market Starting Point")
statusReport = statusDependenciesModule.reportsByMainUtility.get("Market Starting Point")
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
@@ -112,7 +112,7 @@
/*
Here we get the status report from the bot who knows which is the end of the market.
*/
statusReport = statusDependencies.reportsByMainUtility.get("Market Ending Point")
statusReport = statusDependenciesModule.reportsByMainUtility.get("Market Ending Point")
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
@@ -147,7 +147,7 @@
contextVariables.dateEndOfMarket = new Date(thisReport.lastFile.valueOf())
/* Finally we get our own Status Report. */
statusReport = statusDependencies.reportsByMainUtility.get("Self Reference")
statusReport = statusDependenciesModule.reportsByMainUtility.get("Self Reference")
if (statusReport === undefined) { // This means the status report does not exist, that could happen for instance at the begining of a month.
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
@@ -229,9 +229,9 @@
"[ERROR] start -> getContextVariables -> err = " + err.stack)
if (err.message === "Cannot read property 'file' of undefined") {
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[HINT] start -> getContextVariables -> Check the bot configuration to see if all of its statusDependencies declarations are correct. ")
"[HINT] start -> getContextVariables -> Check the bot configuration to see if all of its statusDependenciesModule declarations are correct. ")
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME,
"[HINT] start -> getContextVariables -> Dependencies loaded -> keys = " + JSON.stringify(statusDependencies.keys))
"[HINT] start -> getContextVariables -> Dependencies loaded -> keys = " + JSON.stringify(statusDependenciesModule.keys))
}
callBackFunction(TS.projects.superalgos.globals.standardResponses.DEFAULT_FAIL_RESPONSE)
}
@@ -610,9 +610,7 @@
}
function writeStatusReport(lastFileDate, callBack) {
let reportKey = TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.parentNode.config.codeName + "-" +
TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.config.codeName + "-" + "Multi-Time-Frame-Daily"
let thisReport = statusDependencies.statusReports.get(reportKey)
let thisReport = statusDependenciesModule.reportsByMainUtility.get('Self Reference')
thisReport.file.lastFile = lastFileDate;
thisReport.file.interExecutionMemoryArray = interExecutionMemoryArray;
@@ -12,17 +12,17 @@
let fileStorage = TS.projects.superalgos.taskModules.fileStorage.newFileStorage(processIndex)
let statusDependencies
let statusDependenciesModule
let dataDependenciesModule
let dataFiles = new Map()
let indicatorOutputModule
return thisObject;
function initialize(pStatusDependencies, pDataDependencies, callBackFunction) {
function initialize(pStatusDependencies, pStatusDependenciesModule, callBackFunction) {
statusDependencies = pStatusDependencies
dataDependenciesModule = pDataDependencies
statusDependenciesModule = pStatusDependencies
dataDependenciesModule = pStatusDependenciesModule
indicatorOutputModule = TS.projects.superalgos.botModules.indicatorOutput.newSuperalgosBotModulesIndicatorOutput(processIndex)
indicatorOutputModule.initialize(callBackFunction)
@@ -31,7 +31,7 @@
function finalize() {
fileStorage = undefined
dataFiles = undefined
statusDependencies = undefined
statusDependenciesModule = undefined
dataDependenciesModule = undefined
indicatorOutputModule = undefined
thisObject = undefined
@@ -209,9 +209,7 @@
}
function writeStatusReport(callBack) {
let reportKey = TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.parentNode.config.codeName + "-" +
TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.processes[processIndex].referenceParent.parentNode.config.codeName + "-" + "Multi-Time-Frame-Market"
let thisReport = statusDependencies.statusReports.get(reportKey)
let thisReport = statusDependenciesModule.reportsByMainUtility.get('Self Reference')
thisReport.file.lastExecution = TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_DATETIME;
if (TS.projects.superalgos.globals.taskConstants.TASK_NODE.bot.timeFramesFilter !== undefined) {
@@ -106,7 +106,7 @@ function newUiObjectTitle() {
switch (titleReference) {
case 'Use Parent': {
let nodeToUse = thisObject.payload.parentNode
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.payload.node.name
}
@@ -114,7 +114,7 @@ function newUiObjectTitle() {
}
case 'Use Reference Parent': {
let nodeToUse = thisObject.payload.node.payload.referenceParent
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.payload.node.name
}
@@ -122,7 +122,7 @@ function newUiObjectTitle() {
}
case 'Use Reference Parent Type': {
let nodeToUse = thisObject.payload.node.payload.referenceParent
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.type
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.type
}
@@ -130,7 +130,7 @@ function newUiObjectTitle() {
}
case 'Use Reference Grandparent': {
let nodeToUse = thisObject.payload.node.payload.referenceParent
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
nodeToUse = thisObject.payload.node.payload.referenceParent.payload.referenceParent
if (nodeToUse !== undefined) {
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title
@@ -141,9 +141,9 @@ function newUiObjectTitle() {
}
case 'Use Reference Parent Parent': {
let nodeToUse = thisObject.payload.node.payload.referenceParent
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.payload.node.name
}
@@ -152,11 +152,11 @@ function newUiObjectTitle() {
}
case 'Use Reference Parent Parent Parent': {
let nodeToUse = thisObject.payload.node.payload.referenceParent
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
nodeToUse = thisObject.payload.node.payload.referenceParent.payload.parentNode.payload.parentNode
if (nodeToUse !== undefined && nodeToUse.payload !== undefined) {
if (nodeToUse !== undefined && nodeToUse.payload !== undefined && nodeToUse.payload.node.name !== "New " + nodeToUse.payload.node.type && nodeToUse.payload.node.name !== "My " + nodeToUse.payload.node.type) {
thisObject.payload.title = thisObject.payload.title + separator + nodeToUse.payload.title
thisObject.payload.node.name = thisObject.payload.node.name + separator + nodeToUse.payload.node.name
}
@@ -333,8 +333,8 @@ function newUiObjectTitle() {
if (UI.projects.superalgos.spaces.floatingSpace.inMapMode === true) {
labelPoint = UI.projects.superalgos.spaces.floatingSpace.transformPointToMap(labelPoint)
labelPoint.x = labelPoint.x - getTextWidth(label) / 2,
labelPoint.y = labelPoint.y - 35
labelPoint.x = labelPoint.x - getTextWidth(label) / 2,
labelPoint.y = labelPoint.y - 35
let schemaDocument = getSchemaDocument(thisObject.payload.node)
if (schemaDocument !== undefined) {
@@ -352,19 +352,19 @@ function newUiObjectTitle() {
return
}
/* Split the line into Phrases */
const FRAME_WIDTH = (label.length + 2) / 2 * thisObject.payload.floatingObject.currentFontSize * FONT_ASPECT_RATIO * 1.2 * 2
label = thisObject.payload.title
/* Split the line into Phrases */
const FRAME_WIDTH = (label.length + 2) / 2 * thisObject.payload.floatingObject.currentFontSize * FONT_ASPECT_RATIO * 1.2 * 2
label = thisObject.payload.title
let phrases = splitTextIntoPhrases(label, 2)
let lineSeparator = thisObject.payload.floatingObject.currentFontSize * 1.2
for (let i = 0; i < phrases.length; i++) {
let phrase = phrases[i]
let point = {
x: labelPoint.x - getTextWidth(phrase) / 2 + FRAME_WIDTH / 2,
x: labelPoint.x - getTextWidth(phrase) / 2 + FRAME_WIDTH / 2,
y: labelPoint.y - lineSeparator * (phrases.length - 1 - i)
}
if (UI.projects.superalgos.spaces.floatingSpace.inMapMode === false) {
printMessage(phrase, point)
}
+1
View File
@@ -1,3 +1,4 @@
/* Global Constatns */
let canvas
let PROJECTS_ARRAY