diff --git a/.vs/AAWebPlatform/v15/.suo b/.vs/AAWebPlatform/v15/.suo index 7f9750aa9..d3d714a2b 100644 Binary files a/.vs/AAWebPlatform/v15/.suo and b/.vs/AAWebPlatform/v15/.suo differ diff --git a/TimeLineCoordinateSystem.js b/TimeLineCoordinateSystem.js index fe4cc88b3..1de7389e2 100644 --- a/TimeLineCoordinateSystem.js +++ b/TimeLineCoordinateSystem.js @@ -86,6 +86,19 @@ function newTimeLineCoordinateSystem() { 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. + The x value of the point must be a datetime.valueOf() and is going to be transformed into an x value on the coordinate system of the timeline. + The y value should be a value in the dataset at that moment in time. Depending on how this coordinate system was initialized then are the + possible values y can have. For sure it must be in the range between the min and max y declared at initialization. The y value has a special + treatment since the browser canvas object used, has a zero y value at the top, while the timeline we use has a zero y value at the botton, + for that reason y is flipped. + + Besides this, what we do is to multiply by the scale, which in turn is calculated at initialization time depending on the values provided. + + */ + point = { x: (point.x - this.min.x) * this.scale.x, y: maxHeight - (point.y - this.min.y) * this.scale.y diff --git a/Utilities.js b/Utilities.js index 6daf1683e..056092f1c 100644 --- a/Utilities.js +++ b/Utilities.js @@ -12,7 +12,7 @@ function transformThisPoint(point, container) { /* We apply the zoom factor. */ - point = container.zoom.zoomThisPoint(point); + //point = container.zoom.zoomThisPoint(point); /* We viewport Transformation. */