From ee7885032291d6e1b336da42506da310093f0545 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 19 Apr 2018 10:14:22 +0200 Subject: [PATCH] Plotter Profile Picture being shown --- .vs/AAWeb/v15/.suo | Bin 15872 -> 19968 bytes Panels/ProductsPanel.js | 2 +- ProductCard.js | 21 +++++++++++++++++++-- server.js | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.vs/AAWeb/v15/.suo b/.vs/AAWeb/v15/.suo index 463f066587efc47199144bc721a7184fd5703ec0..47718db55862f583da3cf4e3225a539a9f3e9aa1 100644 GIT binary patch literal 19968 zcmeHO&2tn*6z?^n;3tSiK$L)p5Seu+SvFY^$R?8%mZV5Y04>)llk5Z&LpC*&L@C0- zDsLXVc=ceFH_L-nmIqJ#2U=y7UMxf}-mLP37s21JXM4A2lHHw|On`*#)SKy@>FM|S zb-#~(uk+K7+iraM?XEvWpqvnG;@0gg;vwyM3iSun@2x^Sh&rF$x_$dLAGZNeZIyMz zfj31NfAgY442oIY9dVgc8M?HKP1QMny2)49uKoP(cfbCe+KG03+q}jjz*rX3;&ou3 zL~T%f)T9^x>vpV2o!$PoEB~_a7|T}{g`arm#0)5Kgbg?gUW@_kO1pZu{W0)AfzEDH za8S;O1z?#GQy4$tqK4VR6US>-_X_-}NAdPK0Qpe2q4we=>U|abPoe&w&cGOT%6~ih z*#US4upPj)z~|56z6(J5b_1RVya4C`5Y=AX_gCut&2L)e&T-&Q%D*`DPVRfi|6`c% z1m!=aa|>NJEgMb#Ieyw@-kS~{4RrbEH!Pd*oO*!r_Xz5n0kr*F0MsuJ1NiQ7+^N5w z1Wsn2Mhqz^H_{rryuph<0*>|#3gt;4(?(79s8JV? z1>V!f*AsZnxn&szUKe;z!`E@)37r-1OCM}rOi0hj^_tba(*L2JqRtA7|2W!Gzp?PNYo>i~lvWrL3{g@1&RM!1o)2A2H-Rju69}3b&YB*1N$zlA| zv-GLMj-U2it-k?`k`m}b5~k4mhgA*)SDKE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Dsl7+~)BepQDIc=1T8un2+Cvd!L^rQ_d*pim?lb26W zuzMX8@mwB20b5~9F3$l42Hi>FI9Zc?6Su1%ons9jwo^|e-*(l5;V4y?T*i{e2?=ba z8-lA>If6Vx4aZRnhx#qF4U6Z3Bcm?Ugz!{VDB7_m4vhzc$Pff~uYlkc+5~VMtKk>D zjP~_!BIkk8jyDC9sp4@IuS?#rGL+M??^%Fn$qH(jN0JB2l_|8B3po230hlqj+@lQe zM|72Yq3x`izLEkLpCQZQt3Vt}p#)5vWAU1Z5CgO02MZ7Lw*l}ZUxY4hF7M%KzJRNR z7nn9{&ga4#ja#38Oe0sr(#6AE1&ii=tUm5w$E<#;0d1@QSwnAaTX5ES3nf<>4Z*MD z!bPfBvn0!orF-FKnH=>}wwHZY6L+hEhL8gsC02eke^lVI=hfX`BypoI`601FRa%n8l4E4{{y}nLOS1UA O!c&@gI9R^~N`C{>6MLZm diff --git a/Panels/ProductsPanel.js b/Panels/ProductsPanel.js index a86ff3021..c4f4bea3c 100644 --- a/Panels/ProductsPanel.js +++ b/Panels/ProductsPanel.js @@ -28,7 +28,7 @@ function initialize() { - thisObject.container.frame.width = 400; + thisObject.container.frame.width = 320; thisObject.container.frame.height = viewPort.visibleArea.bottomRight.y - viewPort.visibleArea.topLeft.y + 15; var position = { diff --git a/ProductCard.js b/ProductCard.js index 03118d962..a73d65326 100644 --- a/ProductCard.js +++ b/ProductCard.js @@ -87,7 +87,7 @@ }; this.container.frame.position = position; - this.container.frame.width = 380; + this.container.frame.width = 300; this.container.frame.height = 100; /* We retrieve the locally stored status of the Product */ @@ -300,6 +300,10 @@ const devTeamImageSize = 50; const botImageSize = 50; + const plotterImageSize = { + width: 150, + height: 50 + }; /* First the Dev Team Profile Picture. */ @@ -332,7 +336,20 @@ /* Third the Plotter's Profile Picture. */ + if (thisObject.product.plotter.profilePicture !== undefined) { + let plotterImagePoint = { + x: thisObject.container.frame.width / 2 - plotterImageSize.width / 2, + y: thisObject.container.frame.height / 2 - plotterImageSize.height / 2 + }; + + plotterImagePoint = thisObject.container.frame.frameThisPoint(plotterImagePoint); + + let imageId = thisObject.bot.devTeam + "." + thisObject.product.plotter.codeName + "." + thisObject.product.plotter.moduleName + "." + thisObject.product.plotter.profilePicture; + let plotterImage = document.getElementById(imageId); + browserCanvasContext.drawImage(plotterImage, plotterImagePoint.x, plotterImagePoint.y, plotterImageSize.width, plotterImageSize.height); + + } /* Now the small circle */ @@ -421,7 +438,7 @@ /* product */ - fontSize = 12; + fontSize = 10; label = thisObject.product.displayName; diff --git a/server.js b/server.js index 0ab07539b..312d44aca 100644 --- a/server.js +++ b/server.js @@ -831,7 +831,7 @@ function onBrowserRequest(request, response) { stringToInsert = htmlLineCopy.replace('@devTeam@', devTeam.codeName); stringToInsert = stringToInsert.replace('@repo@', plotter.repo); stringToInsert = stringToInsert.replace('@image@', module.profilePicture); - stringToInsert = stringToInsert.replace('@id@', devTeam.codeName + "." + module.codeName + "." + module.profilePicture); + stringToInsert = stringToInsert.replace('@id@', devTeam.codeName + "." + plotter.codeName + "." + module.codeName + "." + module.profilePicture); let firstPart = fileContent.substring(0, fileContent.indexOf('') + 15); let secondPart = fileContent.substring(fileContent.indexOf('') + 15);