From 2cbc9c75579222812c5bb75fe881f78e37b1f400 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 3 Mar 2018 13:06:56 +0100 Subject: [PATCH] Comments added --- .vs/AAWebPlatform/v15/.suo | Bin 82432 -> 83968 bytes TimeLineCoordinateSystem.js | 13 +++++++++++++ Utilities.js | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.vs/AAWebPlatform/v15/.suo b/.vs/AAWebPlatform/v15/.suo index 7f9750aa98c87d91338bd05b07033f58cfc121fa..d3d714a2b9d47f49a56124c50591668941dc5a1f 100644 GIT binary patch delta 1177 zcmYk5Urbwd6vumhy{&g$fm_;jqsX|FE(1DBkrp8`0$FFsT!?G7p-D4W1QRCXZxfR} z%xW;vCt1(KeKYWbbxJnJ`csKvMkYKA|71MO#6;YhJ?Ih>opDPf={nC3I^`sv{LVS| z+jGx3_t)fvB{^xCKgz(0RjksI{IW;AFGg7uiok9%nJS4VWC+7Pcn=?$8ytR09VW_% zTB07qN;MqBSCy9>J1E{qyg;-Nl^2dV@uuP`vr$k^$Xe146#VD$k#Y#$#a7GLN|JJz zgAvQxP5sl~#Hck2xNL63htJeN30A1P>w~0dAOeJw(1}*UMZ8A1iDtq|RAF4L?kgg% zmv9ifi2Xzz(M~+xYUPP+xZrLc#T17LIeUnxAY}i0h(@A`c&g8nBkrrGRdxHOM8a{4 z7O0WXToB6zV#0YFyY}WpWLL<-Zg|Bx&k?Z8QnF2XN|kt6ew<;KD~FNF>zUr=LLoWR zQ;8a(fDzc}bBYr0UqzW_T@iXHyTc(nk~UG$522&|%_3fi%PV%Y0*8Co6e5eH7*hRkWk1dHZ@_p#I~%VPP|L31ibzwXOI zCb|N4c~#_EWqCP+#Ye#hVxxb*D)d+u_!#477*8sEknwYD^UX4S-fO$z-TIcADaD6y zaVCWQb3>^AY{Bg12DpmA&!RS?;D?{>#-BuuSe!Zx#*`U!)OokiX1bNk$H0)UHeuIy ze*EgvA)LSLN9{+O2+vJGp(tn=UmcO81A_yJf&THpnek?vo~|w4o~a8{s*Jy{ zl#RzaJA3+jUmlDn-WVP`8~aa%$9{=gx7cX%GH! z*M@;RrAE+7Ytimn#nIdq;Oh+Eeq4d`ziK2Z$Bwicd-AUvDH}wMYzgdLXf(qumS(i< z&b)iOPW0qIfwT+MbSadkpQW=7nDI?L)EJXHL0t$2V9jEL+NscFHP|uR?OjL)A!$xG X10xjUUJJA>w6(#CIo%FQx&zq1$uybQ delta 1013 zcmZ{gZAep57{`6i?%Yi`+0xBynK!r0YUxa8_M%y>k}}C9LKgN)ghg142$5J}QQ!yX z1MNc)da#l8WqHbx1ie_W4@DM!s0dphdclIAW?-21T-!hb5B%nFnxCR|IW1rYSTzl9G}(6IsM^Vime18?37@oa_Mu7%5iGS5vXJ z*p4w>J~%O3&RkJM?m{A&NGBAcl*l0V5f)-KF^@3d0oiu=4;48`%0!rnCB!nKf+!)> zCh7*NO`J5+E~0=?2gxSXWip9;Vloj(wwSc|BJY=FJ>Ap?b!6c+y#T|soashy`Y={4 zoDgnviIxp0qGkRz(Eq=$h*|3xR%J|}JLf)kGM<~p%OqZsVmcphaUyOnpsC`RX!Ep! zzggy$68A7XXG;&9EeAyuZ+V`|8(3e%6VMwdLESnrU#gwNWr7YKu$u!$2h0D$RuzS5|8odJil7zQ= zYDCSqtIV`xdggzhqh!noPp9y~cOCCfL+H*DO5`)}YYZRVY8UN4yc%kQi|*1KzoHsE z`O-DB*H-k8=i=yinP~VO1oXYLi{%sV03ScK<5bTAQ906UoVBA-0pzf=0EV;yZUal$QVOG* P;5w?j2BcsmSvRo1a7kz= 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. */