Variable Name Standarization
This commit is contained in:
1 parent
5bf999829f
commit
7e96c2bc49
7 files changed
+19
-15
No files matched your search
+9
-6
@@ -143,7 +143,14 @@ const _3_MINUTES_IN_MILISECONDS = 3 * 60 * 1000;
|
||||
const _2_MINUTES_IN_MILISECONDS = 2 * 60 * 1000;
|
||||
const _1_MINUTE_IN_MILISECONDS = 1 * 60 * 1000;
|
||||
|
||||
const EARLIEST_DATE = new Date(2014, 0, 18, 4, 26, 8);
|
||||
let NEW_SESSION_INITIAL_DATE = new Date(); // This value will be overwritten at the viewPort.initialize if the user had a prevous session with this same browser.
|
||||
|
||||
let maxDate = new Date();
|
||||
maxDate.setMilliseconds(0);
|
||||
maxDate.setDate(maxDate.getDate() + 365 * 4); // We might have charts that projects data into the future.
|
||||
|
||||
const MIN_PLOTABLE_DATE = new Date(2015, 0, 1, 0, 0, 0);
|
||||
const MAX_PLOTABLE_DATE = maxDate;
|
||||
|
||||
const TOP_SPACE_HEIGHT = 5;
|
||||
const BOTTOM_SPACE_HEIGHT = 35;
|
||||
@@ -167,13 +174,9 @@ const PERIOD_10_MIN = "10-min";
|
||||
const PERIOD_05_MIN = "05-min";
|
||||
const PERIOD_01_MIN = "01-min";
|
||||
|
||||
let INITIAL_DATE = new Date(); // This value will be overwritten at the viewPort.initialize if the user had a prevous session with this same browser.
|
||||
|
||||
var maxDate = new Date();
|
||||
maxDate.setMilliseconds(0);
|
||||
maxDate.setDate(maxDate.getDate() + 10);
|
||||
|
||||
const MAX_PLOTABLE_DATE = maxDate;
|
||||
|
||||
|
||||
/*
|
||||
We define here the size of the chartSpace. It has to bee enough big in order to accomodate all the charts we expect to display in this space.
|
||||
|
||||
@@ -37,7 +37,7 @@ function newTimeControlPanel () {
|
||||
panelTabButton.container.frame.parentFrame = thisObject.container.frame
|
||||
panelTabButton.initialize()
|
||||
|
||||
let datetime = INITIAL_DATE
|
||||
let datetime = NEW_SESSION_INITIAL_DATE
|
||||
|
||||
let datetimeDisplay = {
|
||||
currentDatetime: datetime,
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ function newPlottersManager () {
|
||||
let competitionPlotters = []
|
||||
|
||||
let timePeriod = INITIAL_TIME_PERIOD
|
||||
let datetime = INITIAL_DATE
|
||||
let datetime = NEW_SESSION_INITIAL_DATE
|
||||
|
||||
let thisObject = {
|
||||
setDatetime: setDatetime,
|
||||
@@ -476,7 +476,7 @@ function newPlottersManager () {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] initializeProductPlotter -> onProductStorageInitialized -> onPlotterInizialized -> key = ' + pProductCard.product.plotter.devTeam + '-' + pProductCard.product.plotter.codeName + '-' + pProductCard.product.plotter.moduleName) }
|
||||
|
||||
try {
|
||||
// plotter.positionAtDatetime(INITIAL_DATE);
|
||||
// plotter.positionAtDatetime(NEW_SESSION_INITIAL_DATE);
|
||||
} catch (err) {
|
||||
// If the plotter does not implement this function its ok.
|
||||
}
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ function newProductCard () {
|
||||
}
|
||||
|
||||
let timePeriod = INITIAL_TIME_PERIOD
|
||||
let datetime = INITIAL_DATE
|
||||
let datetime = NEW_SESSION_INITIAL_DATE
|
||||
|
||||
/* TODO We are in a transition period in which bots and teams images might be located at different places.
|
||||
What we are going to do then is to try to load them from both places and use the variable that finally gets an
|
||||
|
||||
+3
-1
@@ -204,6 +204,8 @@ function newTimeMachine () {
|
||||
|
||||
if (timeScale !== undefined) { timeScale.draw() }
|
||||
if (rigthScale !== undefined) { rigthScale.draw() }
|
||||
|
||||
thisObject.container.frame.draw(false, true, false)
|
||||
}
|
||||
|
||||
function getContainer (point, purpose) {
|
||||
@@ -242,7 +244,7 @@ function newTimeMachine () {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] recalculateScale -> Entering function.') }
|
||||
|
||||
let minValue = {
|
||||
x: EARLIEST_DATE.valueOf(),
|
||||
x: MIN_PLOTABLE_DATE.valueOf(),
|
||||
y: 0
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
let timeLineCoordinateSystem
|
||||
|
||||
let timePeriod = INITIAL_TIME_PERIOD
|
||||
let datetime = INITIAL_DATE
|
||||
let datetime = NEW_SESSION_INITIAL_DATE
|
||||
|
||||
let thisObject = {
|
||||
setDatetime: setDatetime,
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
moveToUserPosition(thisObject.container, timeLineCoordinateSystem)
|
||||
timePeriod = INITIAL_TIME_PERIOD
|
||||
datetime = INITIAL_DATE
|
||||
datetime = NEW_SESSION_INITIAL_DATE
|
||||
|
||||
/* Event Subscriptions - we need this events to be fired first here and then in active Plotters. */
|
||||
|
||||
|
||||
+1
-2
@@ -105,7 +105,7 @@ function moveToUserPosition (container, timeLineCoordinateSystem, ignoreX, ignor
|
||||
|
||||
viewPort.newZoomLevel(userPosition.zoom)
|
||||
INITIAL_TIME_PERIOD = recalculatePeriod(userPosition.zoom)
|
||||
INITIAL_DATE = new Date(userPosition.date)
|
||||
NEW_SESSION_INITIAL_DATE = new Date(userPosition.date)
|
||||
|
||||
let targetPoint = {
|
||||
x: (new Date(userPosition.date)).valueOf(),
|
||||
@@ -150,4 +150,3 @@ function removeTime (datetime) {
|
||||
|
||||
return dateOnly
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user