From 1e3cee0b46c71defc7ba3ab6c2d0c28199f68875 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 7 May 2020 13:59:36 +0200 Subject: [PATCH] Fixed when reports to the coordinate system --- Plotter.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Plotter.js b/Plotter.js index c17556477..ff1bf1368 100644 --- a/Plotter.js +++ b/Plotter.js @@ -570,23 +570,23 @@ function newPlotter () { let x = 0 let y = 0 eval(point.pointFormula.code) - let dataPoint = { + let rawPoint = { x: x, y: y } - /* Contributing to Auto-Scale */ - coordinateSystem.reportYValue(dataPoint.y) /* The information we store in files is independent from the charing system and its coordinate systems. That means that the first thing we allways need to do is to trasform these points to the coordinate system of the timeline. */ - dataPoint = coordinateSystem.transformThisPoint(dataPoint) + let dataPoint + dataPoint = coordinateSystem.transformThisPoint(rawPoint) dataPoint = transformThisPoint(dataPoint, thisObject.container) dataPoint = canvas.chartingSpace.viewport.fitIntoVisibleArea(dataPoint) dataPoint = thisObject.fitFunction(dataPoint) /* Store the data point at the local map */ + dataPoint.rawPoint = rawPoint dataPoints.set(point.id, dataPoint) } } @@ -730,6 +730,12 @@ function newPlotter () { console.log('[WARN] You have a Polygon Vertex not referencing any Point.') continue } + + /* Contributing to Auto-Scale */ + if (dataPointObject.rawPoint.y > 1 && dataPointObject.rawPoint.y !== undefined && isNaN(dataPointObject.rawPoint.y) === false) { + coordinateSystem.reportYValue(dataPointObject.rawPoint.y) + } + let dataPoint = { x: dataPointObject.x, y: dataPointObject.y