Autoformatter applied on all js files

This commit is contained in:
Luis Fernando Molina committed 2019-02-23 10:32:06 +01:00
1 parent 72c1017b20
commit c627aedcf6
59 files changed
+9087 -10892

No files matched your search

+75 -103
View File
@@ -1,4 +1,4 @@
/*
/*
This Object object is responsible for defining the coordinate system in a TimeLine.
@@ -7,85 +7,77 @@ The scale on the Y axis depends on the data that wants to be plotted. Usually we
*/
function newTimeLineCoordinateSystem() {
function newTimeLineCoordinateSystem () {
var thisObject = {
min: undefined,
max: undefined,
scale: undefined,
transformThisPoint: transformThisPoint,
transformThisPoint2: transformThisPoint2,
unInverseTransform: unInverseTransform,
inverseTransformUncappedY: inverseTransformUncappedY,
initializeX: initializeX,
initializeY: initializeY,
initialize: initialize
}
var thisObject = {
min: undefined,
max: undefined,
scale: undefined,
transformThisPoint: transformThisPoint,
transformThisPoint2: transformThisPoint2,
unInverseTransform: unInverseTransform,
inverseTransformUncappedY: inverseTransformUncappedY,
initializeX: initializeX,
initializeY: initializeY,
initialize: initialize
};
var min = {
x: 0,
y: 0
}
var min = {
x: 0,
y: 0
};
var max = {
x: 0,
y: 0
}
var max = {
x: 0,
y: 0
};
var scale = {
x: 0,
y: 0
}
var scale = {
x: 0,
y: 0
};
thisObject.min = min
thisObject.max = max
thisObject.scale = scale
thisObject.min = min;
thisObject.max = max;
thisObject.scale = scale;
let maxHeight
let maxHeight;
return thisObject;
function initialize(minValue, maxValue, maxWidth, pMaxHeight) {
return thisObject
function initialize (minValue, maxValue, maxWidth, pMaxHeight) {
/* Defines the min and max value of rate that we are going to transport to the available screen at the center position. */
thisObject.min.x = minValue.x; // * 0.999; // 0.1% less
thisObject.max.x = maxValue.x; // * 1.001; // 0.1% more
thisObject.min.x = minValue.x // * 0.999; // 0.1% less
thisObject.max.x = maxValue.x // * 1.001; // 0.1% more
thisObject.min.y = minValue.y; // * 0.999; // 0.1% less
thisObject.max.y = maxValue.y; // * 1.001; // 0.1% more
thisObject.min.y = minValue.y // * 0.999; // 0.1% less
thisObject.max.y = maxValue.y // * 1.001; // 0.1% more
/* Defines the initial Zoom level at center position. */
thisObject.scale.x = maxWidth / (thisObject.max.x - thisObject.min.x);
thisObject.scale.y = pMaxHeight / (thisObject.max.y - thisObject.min.y);
thisObject.scale.x = maxWidth / (thisObject.max.x - thisObject.min.x)
thisObject.scale.y = pMaxHeight / (thisObject.max.y - thisObject.min.y)
maxHeight = pMaxHeight;
maxHeight = pMaxHeight
}
}
function initializeX (minValue, maxValue, maxWidth) {
thisObject.min.x = minValue.x // * 0.999; // 0.1% less
thisObject.max.x = maxValue.x // * 1.001; // 0.1% more
function initializeX(minValue, maxValue, maxWidth) {
thisObject.scale.x = maxWidth / (thisObject.max.x - thisObject.min.x)
}
thisObject.min.x = minValue.x; // * 0.999; // 0.1% less
thisObject.max.x = maxValue.x; // * 1.001; // 0.1% more
function initializeY (minValue, maxValue, pMaxHeight) {
thisObject.min.y = minValue.y // * 0.999; // 0.1% less
thisObject.max.y = maxValue.y // * 1.001; // 0.1% more
thisObject.scale.x = maxWidth / (thisObject.max.x - thisObject.min.x);
thisObject.scale.y = pMaxHeight / (thisObject.max.y - thisObject.min.y)
}
function initializeY(minValue, maxValue, pMaxHeight) {
thisObject.min.y = minValue.y; // * 0.999; // 0.1% less
thisObject.max.y = maxValue.y; // * 1.001; // 0.1% more
thisObject.scale.y = pMaxHeight / (thisObject.max.y - thisObject.min.y);
maxHeight = pMaxHeight;
}
function transformThisPoint(point) {
maxHeight = pMaxHeight
}
function transformThisPoint (point) {
/*
This is the straigh fordward transformation this object provides. The input is a point on the data set that wants to be plotted in a timeline.
@@ -99,59 +91,39 @@ function newTimeLineCoordinateSystem() {
*/
point = {
x: (point.x - this.min.x) * this.scale.x,
y: maxHeight - (point.y - this.min.y) * this.scale.y
};
return point;
point = {
x: (point.x - this.min.x) * this.scale.x,
y: maxHeight - (point.y - this.min.y) * this.scale.y
}
return point
}
function transformThisPoint2(point) {
point = {
x: (point.x - this.min.x) * this.scale.x,
y: (maxHeight- point.y - this.min.y) * this.scale.y
};
return point;
function transformThisPoint2 (point) {
point = {
x: (point.x - this.min.x) * this.scale.x,
y: (maxHeight - point.y - this.min.y) * this.scale.y
}
return point
}
function unInverseTransform(point, inverseY) {
point = {
x: (point.x / this.scale.x) + this.min.x,
y: (inverseY - point.y) / this.scale.y + this.min.y
};
return point;
function unInverseTransform (point, inverseY) {
point = {
x: (point.x / this.scale.x) + this.min.x,
y: (inverseY - point.y) / this.scale.y + this.min.y
}
return point
}
function inverseTransformUncappedY(point, inverseY) {
point = {
x: (point.x - this.min.x) * this.scale.x,
y: (inverseY - point.y) * this.scale.y
};
return point;
function inverseTransformUncappedY (point, inverseY) {
point = {
x: (point.x - this.min.x) * this.scale.x,
y: (inverseY - point.y) * this.scale.y
}
return point
}
}