Panels Working
This commit is contained in:
1 parent
e5b57afba9
commit
d6e1739bdc
6 files changed
+17
-21
No files matched your search
Binary file not shown.
+4
-7
@@ -1,8 +1,8 @@
|
||||
|
||||
function newCandlePanel() {
|
||||
function newAAMastersPlottersCandlesVolumesCandlesCandlePanel() {
|
||||
|
||||
var currentCandlePanel = {
|
||||
onCurrentCandleChanged: onCurrentCandleChanged,
|
||||
onEventRaised: onEventRaised,
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer,
|
||||
@@ -26,14 +26,11 @@ function newCandlePanel() {
|
||||
currentCandlePanel.container.frame.width = 250;
|
||||
currentCandlePanel.container.frame.height = 300;
|
||||
|
||||
currentCandlePanel.container.frame.position.x = viewPort.visibleArea.topRight.x - currentCandlePanel.container.frame.width - 180;
|
||||
currentCandlePanel.container.frame.position.x = viewPort.visibleArea.topRight.x - currentCandlePanel.container.frame.width * 2;
|
||||
currentCandlePanel.container.frame.position.y = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getContainer(point) {
|
||||
|
||||
var container;
|
||||
@@ -54,7 +51,7 @@ function newCandlePanel() {
|
||||
}
|
||||
|
||||
|
||||
function onCurrentCandleChanged(lastCurrentCandle) {
|
||||
function onEventRaised(lastCurrentCandle) {
|
||||
|
||||
currentCandle = lastCurrentCandle;
|
||||
|
||||
|
||||
+1
-1
@@ -565,7 +565,7 @@
|
||||
innerCandle: candle
|
||||
};
|
||||
|
||||
thisObject.container.eventHandler.raiseEvent("Current Candle Info Changed", currentCandle);
|
||||
thisObject.container.eventHandler.raiseEvent("Current Candle Changed", currentCandle);
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
+3
-6
@@ -1,8 +1,8 @@
|
||||
|
||||
function newVolumePanel() {
|
||||
function newAAMastersPlottersCandlesVolumesVolumesVolumePanel() {
|
||||
|
||||
var currentVolumePanel = {
|
||||
onCurrentVolumeChanged: onCurrentVolumeChanged,
|
||||
onEventRaised: onEventRaised,
|
||||
container: undefined,
|
||||
draw: draw,
|
||||
getContainer: getContainer,
|
||||
@@ -29,11 +29,8 @@ function newVolumePanel() {
|
||||
currentVolumePanel.container.frame.position.x = viewPort.visibleArea.topRight.x - currentVolumePanel.container.frame.width;
|
||||
currentVolumePanel.container.frame.position.y = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getContainer(point) {
|
||||
|
||||
var container;
|
||||
@@ -54,7 +51,7 @@ function newVolumePanel() {
|
||||
}
|
||||
|
||||
|
||||
function onCurrentVolumeChanged(lastCurrentVolume) {
|
||||
function onEventRaised(lastCurrentVolume) {
|
||||
|
||||
currentVolume = lastCurrentVolume;
|
||||
|
||||
|
||||
+3
-3
@@ -215,7 +215,7 @@
|
||||
|
||||
if (datetime.valueOf() >= volume.begin && datetime.valueOf() <= volume.end) {
|
||||
|
||||
thisObject.container.eventHandler.raiseEvent("Current Candle Changed", thisObject.currentCandle);
|
||||
thisObject.container.eventHandler.raiseEvent("Current Volume Changed", thisObject.currentCandle);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -610,7 +610,7 @@
|
||||
|
||||
if (dateValue >= volume.begin && dateValue <= volume.end) {
|
||||
|
||||
browserCanvasContext.fillStyle = 'rgba(255, 233, 31, 0.40)'; // Current candle accroding to time
|
||||
browserCanvasContext.fillStyle = 'rgba(255, 233, 31, 0.40)'; // Current volume accroding to time
|
||||
|
||||
} else {
|
||||
|
||||
@@ -656,7 +656,7 @@
|
||||
innerVolumeBar: volume
|
||||
};
|
||||
|
||||
thisObject.container.eventHandler.raiseEvent("Current Volume Info Changed", currentVolume);
|
||||
thisObject.container.eventHandler.raiseEvent("Current Volume Changed", currentVolume);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
"profilePicture": "Candles.png",
|
||||
"panels": [
|
||||
{
|
||||
"codeName": "Current Candle",
|
||||
"moduleName": "CandlePanel"
|
||||
"codeName": "CandlePanel",
|
||||
"moduleName": "CandlePanel",
|
||||
"event": "Current Candle Changed"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -22,8 +23,9 @@
|
||||
"profilePicture": "Volumes.png",
|
||||
"panels": [
|
||||
{
|
||||
"codeName": "Current Volume",
|
||||
"moduleName": "VolumePanel"
|
||||
"codeName": "VolumePanel",
|
||||
"moduleName": "VolumePanel",
|
||||
"event": "Current Volume Changed"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user