diff --git a/Globals.js b/Globals.js index 8c5fa7858..3727148bc 100644 --- a/Globals.js +++ b/Globals.js @@ -99,31 +99,6 @@ let dailyFilePeriods = dailyFilePeriods = JSON.parse(dailyFilePeriods); -function convertTimeFrameToName(pTimeFrame) { - - for (let i = 0; i < dailyFilePeriods.length; i++) { - - let period = dailyFilePeriods[i]; - - if (period[0] === pTimeFrame) { - - return period[1]; - - } - } - - for (let i = 0; i < marketFilesPeriods.length; i++) { - - let period = marketFilesPeriods[i]; - - if (period[0] === pTimeFrame) { - - return period[1]; - - } - } -} - window.AT_BREAKPOINT = false; let testUser = window.localStorage.getItem("test_user") diff --git a/Panels/Layer.js b/Panels/Layer.js index ec12bd93a..95272fb30 100644 --- a/Panels/Layer.js +++ b/Panels/Layer.js @@ -451,10 +451,10 @@ function newLayer () { roundedCornersBackground(params) - drawLabel(label1, 1 / 2, 6 / 10, -5, 0, 17, thisObject.container) + drawLabel(label1, 1 / 2, 6 / 10, -5, 0, 18, thisObject.container) - drawLabel(label3, 1 / 2, 8.2 / 10, -5, 0, 10, thisObject.container) - drawLabel(label4, 1 / 2, 9.5 / 10, -5, 0, 10, thisObject.container) + drawLabel(label3, 1 / 2, 8.2 / 10, -5, 0, 9, thisObject.container) + drawLabel(label4, 1 / 2, 9.5 / 10, -5, 0, 9, thisObject.container) /* Images */ drawIcon(icon1, 1 / 8, 2 / 10, 0, 0, 15, thisObject.container) diff --git a/Panels/LayersPanel.js b/Panels/LayersPanel.js index debf7c8b0..0bcf9cb7f 100644 --- a/Panels/LayersPanel.js +++ b/Panels/LayersPanel.js @@ -346,11 +346,11 @@ function newProductsPanel () { roundedCornersBackground(params) - drawLabel(label1, 1 / 2, 0, 0, 15, 10, thisObject.container) - drawLabel(label2, 1 / 2, 0, 0, 30, 10, thisObject.container) + drawLabel(label1, 1 / 2, 0, 0, 15, 9, thisObject.container) + drawLabel(label2, 1 / 2, 0, 0, 30, 9, thisObject.container) - drawIcon(icon1, 1 / 8, 0, 0, 20, 35, thisObject.container) - drawIcon(icon2, 7 / 8, 0, 0, 20, 35, thisObject.container) + drawIcon(icon1, 1 / 8, 0, 0, 20, 32, thisObject.container) + drawIcon(icon2, 7 / 8, 0, 0, 20, 32, thisObject.container) } function drawScrollBar () { diff --git a/Scales/Commons.js b/Scales/Commons.js index 9011b35cf..381dd53a0 100644 --- a/Scales/Commons.js +++ b/Scales/Commons.js @@ -21,12 +21,12 @@ function drawScaleDisplay (label1, label2, label3, xExtraOffSet1, xExtraOffSet2, label2 = label2.substring(0, 20) label3 = label3.substring(0, 20) - drawLabel(label1, 1 / 2, 92 / 100, 0, 0, 10, container) + drawLabel(label1, 1 / 2, 92 / 100, 0, 0, 9, container) drawLabel(label2, 1 / 2, 42 / 100, 0, 0, 18, container) - drawLabel(label3, 1 / 2, 67 / 100, 0, 0, 10, container) + drawLabel(label3, 1 / 2, 67 / 100, 0, 0, 9, container) - drawIcon(icon1, 1 / 8, 1 / 2, 0, 0, 35, container) - drawIcon(icon2, 7 / 8, 1 / 2, 0, 0, 35, container) + drawIcon(icon1, 1 / 8, 1 / 2, 0, 0, 32, container) + drawIcon(icon2, 7 / 8, 1 / 2, 0, 0, 32, container) } function drawScaleDisplayCover (container) { @@ -42,3 +42,4 @@ function drawScaleDisplayCover (container) { roundedCornersBackground(params) } + diff --git a/Utilities.js b/Utilities.js index 52f02cbf4..7c900b3b7 100644 --- a/Utilities.js +++ b/Utilities.js @@ -1,3 +1,18 @@ +function convertTimeFrameToName (pTimeFrame) { + for (let i = 0; i < dailyFilePeriods.length; i++) { + let period = dailyFilePeriods[i] + if (period[0] === pTimeFrame) { + return period[1] + } + } + + for (let i = 0; i < marketFilesPeriods.length; i++) { + let period = marketFilesPeriods[i] + if (period[0] === pTimeFrame) { + return period[1] + } + } +} function download (filename, text) { let element = document.createElement('a')