All working
This commit is contained in:
1 parent
14de0af04f
commit
f7af6d49a9
3 files changed
+1
-28
No files matched your search
Binary file not shown.
-27
@@ -104,7 +104,6 @@
|
||||
layerStatus = pLayerStatus;
|
||||
|
||||
recalculate();
|
||||
postitionViewPort();
|
||||
|
||||
viewPort.eventHandler.listenToEvent("Zoom Changed", onZoomChanged);
|
||||
canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished);
|
||||
@@ -202,32 +201,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function postitionViewPort() {
|
||||
|
||||
try {
|
||||
|
||||
let targetPoint = {
|
||||
x: candles[Math.round(candles.length / 2)].begin,
|
||||
y: candles[Math.round(candles.length / 2)].min + (candles[Math.round(candles.length / 2)].max - candles[Math.round(candles.length / 2)].min)
|
||||
};
|
||||
|
||||
targetPoint = plotArea.inverseTransform(targetPoint, thisObject.container.frame.height);
|
||||
targetPoint = transformThisPoint(targetPoint, thisObject.container);
|
||||
|
||||
let displaceVector = {
|
||||
x: (viewPort.visibleArea.bottomRight.x - viewPort.visibleArea.topLeft.x) / 2 - targetPoint.x,
|
||||
y: (viewPort.visibleArea.bottomLeft.y - viewPort.visibleArea.topLeft.y) / 2 - targetPoint.y
|
||||
};
|
||||
|
||||
viewPort.displace(displaceVector);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
// if there data is missing of the days it must position in then an exception is raised.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function positionAtDatetime(newDatetime) {
|
||||
|
||||
value = newDatetime.valueOf();
|
||||
|
||||
+1
-1
@@ -418,7 +418,7 @@
|
||||
|
||||
for (var i = 0; i < marketFile.length; i++) {
|
||||
|
||||
let currentMax = marketFile[i][0] + marketFile[i][1];
|
||||
let currentMax = (marketFile[i][0] + marketFile[i][1]) * 4;
|
||||
|
||||
if (maxValue < currentMax) {
|
||||
maxValue = currentMax;
|
||||
|
||||
Reference in new issue
Block a user