From 976393bb945af959ed04ca4d345b4cb5c2723652 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 3 Mar 2018 12:53:57 +0100 Subject: [PATCH] Refactoring Coordinate System Completed --- .vs/Plotters-Candles-Volumes/v15/.suo | Bin 20480 -> 20480 bytes Candles.js | 22 +++++++++++----------- Volumes.js | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.vs/Plotters-Candles-Volumes/v15/.suo b/.vs/Plotters-Candles-Volumes/v15/.suo index e5084fecadc0b623c010c5c4a17aacc6c30883d9..252ef6abba5d28bd285760bab4858430b271b1dc 100644 GIT binary patch delta 149 zcmZozz}T>WaYGIh>w)TPZI3q>GW}*|ZP4u~d$PHZ?Y`CI1Q)K!lbtmtH#xRV4sbM@ zY~?fsCbr3WEu-*jMg}O5I`ALJc3@zb%;?+!R$JxzNpLkxnnCKoE+AWIbFJHD7MKy( Jj9ui*3;?I$G9v&0 delta 153 zcmZozz}T>WaYGIh>w{x07w>H@Wctm_DzGW?+WpOiZ1=4u%e!$+p6skKxyi9@a)6`J zWGkmBFtJU}YZ-;tFfzb_8Ia}5z%ZH7xdW<3b8@xoM?ts(AVU&}6*kwpU1ot9gU#qg GzRUoVSuYO& diff --git a/Candles.js b/Candles.js index 8c03872e7..d7b437bf3 100644 --- a/Candles.js +++ b/Candles.js @@ -170,7 +170,7 @@ y: candles[i].open }; - targetPoint = timeLineCoordinateSystem.inverseTransform(targetPoint, thisObject.container.frame.height); + targetPoint = timeLineCoordinateSystem.transformThisPoint(targetPoint); targetPoint = transformThisPoint(targetPoint, thisObject.container); let targetMax = { @@ -178,7 +178,7 @@ y: candles[i].max }; - targetMax = timeLineCoordinateSystem.inverseTransform(targetMax, thisObject.container.frame.height); + targetMax = timeLineCoordinateSystem.transformThisPoint(targetMax); targetMax = transformThisPoint(targetMax, thisObject.container); let targetMin = { @@ -186,7 +186,7 @@ y: candles[i].min }; - targetMin = timeLineCoordinateSystem.inverseTransform(targetMin, thisObject.container.frame.height); + targetMin = timeLineCoordinateSystem.transformThisPoint(targetMin); targetMin = transformThisPoint(targetMin, thisObject.container); let center = { @@ -469,10 +469,10 @@ y: candle.close }; - candlePoint1 = timeLineCoordinateSystem.inverseTransform(candlePoint1, thisObject.container.frame.height); - candlePoint2 = timeLineCoordinateSystem.inverseTransform(candlePoint2, thisObject.container.frame.height); - candlePoint3 = timeLineCoordinateSystem.inverseTransform(candlePoint3, thisObject.container.frame.height); - candlePoint4 = timeLineCoordinateSystem.inverseTransform(candlePoint4, thisObject.container.frame.height); + candlePoint1 = timeLineCoordinateSystem.transformThisPoint(candlePoint1); + candlePoint2 = timeLineCoordinateSystem.transformThisPoint(candlePoint2); + candlePoint3 = timeLineCoordinateSystem.transformThisPoint(candlePoint3); + candlePoint4 = timeLineCoordinateSystem.transformThisPoint(candlePoint4); candlePoint1 = transformThisPoint(candlePoint1, thisObject.container); candlePoint2 = transformThisPoint(candlePoint2, thisObject.container); @@ -508,10 +508,10 @@ y: candle.min }; - stickPoint1 = timeLineCoordinateSystem.inverseTransform(stickPoint1, thisObject.container.frame.height); - stickPoint2 = timeLineCoordinateSystem.inverseTransform(stickPoint2, thisObject.container.frame.height); - stickPoint3 = timeLineCoordinateSystem.inverseTransform(stickPoint3, thisObject.container.frame.height); - stickPoint4 = timeLineCoordinateSystem.inverseTransform(stickPoint4, thisObject.container.frame.height); + stickPoint1 = timeLineCoordinateSystem.transformThisPoint(stickPoint1); + stickPoint2 = timeLineCoordinateSystem.transformThisPoint(stickPoint2); + stickPoint3 = timeLineCoordinateSystem.transformThisPoint(stickPoint3); + stickPoint4 = timeLineCoordinateSystem.transformThisPoint(stickPoint4); stickPoint1 = transformThisPoint(stickPoint1, thisObject.container); stickPoint2 = transformThisPoint(stickPoint2, thisObject.container); diff --git a/Volumes.js b/Volumes.js index 4561bcda1..776cb6147 100644 --- a/Volumes.js +++ b/Volumes.js @@ -441,10 +441,10 @@ y: 0 }; - volumePointA1 = plot.inverseTransform(volumePointA1, height); - volumePointA2 = plot.inverseTransform(volumePointA2, height); - volumePointA3 = plot.inverseTransform(volumePointA3, height); - volumePointA4 = plot.inverseTransform(volumePointA4, height); + volumePointA1 = plot.transformThisPoint(volumePointA1); + volumePointA2 = plot.transformThisPoint(volumePointA2); + volumePointA3 = plot.transformThisPoint(volumePointA3); + volumePointA4 = plot.transformThisPoint(volumePointA4); volumePointA1 = transformThisPoint(volumePointA1, thisObject.container); volumePointA2 = transformThisPoint(volumePointA2, thisObject.container); @@ -506,10 +506,10 @@ y: height }; - volumePointB1 = plot.inverseTransform2(volumePointB1, height); - volumePointB2 = plot.inverseTransform2(volumePointB2, height); - volumePointB3 = plot.inverseTransform2(volumePointB3, height); - volumePointB4 = plot.inverseTransform2(volumePointB4, height); + volumePointB1 = plot.transformThisPoint2(volumePointB1); + volumePointB2 = plot.transformThisPoint2(volumePointB2); + volumePointB3 = plot.transformThisPoint2(volumePointB3); + volumePointB4 = plot.transformThisPoint2(volumePointB4); volumePointB1 = transformThisPoint(volumePointB1, thisObject.container); volumePointB2 = transformThisPoint(volumePointB2, thisObject.container);