From b04812762dc4afa060b53bab4432eefd5ca41a63 Mon Sep 17 00:00:00 2001 From: Brenden Harrell Date: Sat, 11 Sep 2021 08:57:36 -0500 Subject: [PATCH 1/2] Harden Tutorial Icon loading --- .../UI/Spaces/Tutorial-Space/TutorialSpace.js | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js b/Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js index 11d44df78..c98cd96e4 100644 --- a/Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js +++ b/Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js @@ -287,18 +287,28 @@ function newEducationTutorialSpace() { function checkImage() { let tutorialImageDiv = document.getElementById('tutorialImageDiv') - if (tutorialImageDiv !== null && tutorialImageDiv !== undefined) { + if (tutorialImageDiv !== null && tutorialImageDiv !== undefined) { tutorialImageDiv.appendChild(htmlImage) } if (newImageName === undefined) { return } if (currentImageName === newImageName) { return } currentImageName = newImageName - let webParam = 'Icons/' + newImageProject + '/' + newImageName + '.png' - - htmlImage.src = webParam - htmlImage.width = "100" - htmlImage.height = "100" + + // If gathering Icon by Project and Name get it now + let icon = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(newImageProject, newImageName) + if (icon !== undefined) { + htmlImage.src = icon.src + htmlImage.width = "100" + htmlImage.height = "100" + } else if (icon === undefined) { + // Legacy Code to handle icons being fetched by literal path + // Note: This if statment should be removed once all tutoials have been refactored + let webParam = 'Icons/' + newImageProject + '/' + newImageName + '.png' + htmlImage.src = webParam + htmlImage.width = "100" + htmlImage.height = "100" + } } function checkDocumentation() { From aae822904815f367329193f46008294d9329ed46 Mon Sep 17 00:00:00 2001 From: Brenden Harrell Date: Thu, 1 Jul 2021 21:45:47 -0500 Subject: [PATCH 2/2] Various Doc Updates --- .../Trading-Logic/trading-logic-002-syntax-overview.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json b/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json index 45e9fe125..113a9beaf 100644 --- a/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json +++ b/Projects/Foundations/Schemas/Docs-Topics/T/Trading/Trading-Logic/trading-logic-002-syntax-overview.json @@ -160,8 +160,8 @@ }, { "style": "Javascript", - "text": "productPluralVariable[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-n].propertyName", - "updated": 1624868076284 + "text": "productName[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-n].propertyName", + "updated": 1625193412334 }, { "style": "Text", @@ -175,8 +175,8 @@ }, { "style": "Javascript", - "text": "chart.at01hs.candles[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-5].max", - "updated": 1624868093927 + "text": "chart.at01hs.candle[tradingEngine.tradingCurrent.tradingEpisode.candle.index.value-5].max", + "updated": 1625193408514 }, { "style": "Text",