From 2c67c83a09c57aa3a66d35265612e9a321ccb18c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 20 Mar 2019 22:45:27 +0100 Subject: [PATCH] Tab Button --- CandlePanel.js | 9 +++++++++ VolumePanel.js | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/CandlePanel.js b/CandlePanel.js index ad2a09c78..6434a6bc9 100644 --- a/CandlePanel.js +++ b/CandlePanel.js @@ -17,6 +17,7 @@ function newAAMastersPlottersCandlesVolumesCandlesCandlePanel() { container.frame.containerName = "Current Candle Panel"; let currentCandle; + let panelTabButton return thisObject; @@ -28,12 +29,19 @@ function newAAMastersPlottersCandlesVolumesCandlesCandlePanel() { thisObject.container.frame.position.x = viewPort.visibleArea.topRight.x - thisObject.container.frame.width * 2; thisObject.container.frame.position.y = viewPort.visibleArea.bottomLeft.y - thisObject.container.frame.height; + panelTabButton = newPanelTabButton() + panelTabButton.parentContainer = thisObject.container + panelTabButton.container.frame.parentFrame = thisObject.container.frame + panelTabButton.initialize() } function getContainer(point) { var container; + container = panelTabButton.getContainer(point) + if (container !== undefined) { return container } + /* First we check if this point is inside this space. */ if (this.container.frame.isThisPointHere(point, true) === true) { @@ -63,6 +71,7 @@ function newAAMastersPlottersCandlesVolumesCandlesCandlePanel() { plotCurrentCandleInfo(); + panelTabButton.draw() } diff --git a/VolumePanel.js b/VolumePanel.js index ad2c266e1..d17080c3c 100644 --- a/VolumePanel.js +++ b/VolumePanel.js @@ -17,6 +17,7 @@ function newAAMastersPlottersCandlesVolumesVolumesVolumePanel() { container.frame.containerName = "Current Volume Panel"; let currentVolume; + let panelTabButton return thisObject; @@ -28,12 +29,19 @@ function newAAMastersPlottersCandlesVolumesVolumesVolumePanel() { thisObject.container.frame.position.x = viewPort.visibleArea.topRight.x - thisObject.container.frame.width; thisObject.container.frame.position.y = viewPort.visibleArea.bottomLeft.y - thisObject.container.frame.height; + panelTabButton = newPanelTabButton() + panelTabButton.parentContainer = thisObject.container + panelTabButton.container.frame.parentFrame = thisObject.container.frame + panelTabButton.initialize() } function getContainer(point) { var container; + container = panelTabButton.getContainer(point) + if (container !== undefined) { return container } + /* First we check if this point is inside this space. */ if (this.container.frame.isThisPointHere(point, true) === true) { @@ -63,6 +71,7 @@ function newAAMastersPlottersCandlesVolumesVolumesVolumePanel() { plotCurrentVolumeInfo(); + panelTabButton.draw() }