From d868d768ac40b223ebc764f5812f0bbcf5c0e3e6 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 5 Mar 2018 13:38:14 +0100 Subject: [PATCH] No competitions panel for now --- .vs/AAWebPlatform/v15/.suo | Bin 75264 -> 74752 bytes AAWebPlatform.njsproj | 3 - Panels/CompetitionsPanel.js | 185 ------------------------------------ Panels/ProductsPanel.js | 2 +- 4 files changed, 1 insertion(+), 189 deletions(-) delete mode 100644 Panels/CompetitionsPanel.js diff --git a/.vs/AAWebPlatform/v15/.suo b/.vs/AAWebPlatform/v15/.suo index 75d32ef4d0ac97b662c49a944b4be801c67a4993..6fdc2e19996a1d97611f8082c6da41c62b690157 100644 GIT binary patch delta 2273 zcmbuA4NTN!7{LGUdw-5QxPt=}4-mOKQN-@x?tuH?s{>9`NjqAasU;v762b{bQzSWN zYi_xcdny`jEZ(>3Pq)B3*0NyZ>*`^FGh} zKL7W9-Y@@g(f^US%M9M9lv<4-L<@o-L#|IwPNEP9lDfa@cLI0Ib#W(&czoL%r${AQ zUH3o-?I32Dpxa3dY>_R2!_gMf2oti5E(12e2$MFH@nJm$NETue1OPF;CKq)xl8;m%I6J|G=n&q| zjnayU;d*sga$mv}eRfz^OtD!|F9N+X33Lh(JZ@23iWV>{%~5kvd8nr<$>IpNuR&Rh z+=0{~^~ic;1H%8s%P!PguoDa_-2vJZ=k05Fk0*K|+Czz642M+(aFzN)soqL_FcF=* zT#as?)&+O^?Di;<~m6{0K&>%1RdtVQAaVw8{><Kl<}q;-m&``WNR3u#ASEXo*&*$3xh9Lges^G2>qmt(dQk_+vsE|LQi z)4GUBYFDo&dOp6J;SvArxxXf!upG*CG@z-j+LBmFRD8Sfj754X`97qGAYIFl(O{`a!Rd*W;tiLh!Jlb>%;cF; z>C8if*(l4A2aSt}qH#)p@R@c7+zw^rILz8#^*ZVCYFIvHg`#Gj=1BX~htkVGyRdu3 zuTH}@*nPqbt}o_6&DUD81Ih~5_1Z)-SCjZ-tMK8DFH;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4+DoUW^tyHBs zmQm8Dw8oc`U}41a%|N+sU9fP6B4VuQiJh@$)D%;SDn233XuYC;z(csqz*weLw1!_a z&fXR39qEX`}9=NSK|(Bl-DwTfO0#9 zg50?Nt!qe(vaxZJ@I#b4D6gZ=1F|A_&Z+oe>g*~CA;RF$6`Skof=k;|z_UFb&b__~ zqkfTe%0!Nx`5P1lob5`xvxD%1i+y_;?_`{_f7kN(UoDTl90ZM?Snv!oMfX7^3Av7Y z!$-TwAs}Ni0KPHPc zt}BlaaD1N)(^rGQa`mP-aV4-#B`=Av?=s=t$-v=r4zjv0Xz7?|(uzAHAL4zMC=R!S zz`*p*e`uz^a<68Z;j#CL&trpd0=~U`30&hY=(u2lvr|TB8;^3jv;5cVId1{WgbThp zUk%myZ)$c-iz8C%KN?5kAfZ&ompvZyUObm_@Q(y6n^Rz0S&W<_yIYQanoxLo_PwWm z&o&%Zx;+i#j`g$LG5lHp%>Mi;%zTmkx2+UI`h@nsTby4D6579w5z}cC8Ap3& - - Code - Code diff --git a/Panels/CompetitionsPanel.js b/Panels/CompetitionsPanel.js deleted file mode 100644 index 19e77c83d..000000000 --- a/Panels/CompetitionsPanel.js +++ /dev/null @@ -1,185 +0,0 @@ - - - -function newCompetitionsPanel() { - - var thisObject = { - container: undefined, - getLoadingCompetitions: getLoadingCompetitions, - draw: draw, - getContainer: getContainer, // returns the inner most container that holds the point received by parameter. - initialize: initialize - }; - - /* Cointainer stuff */ - - var container = newContainer(); - - container.name = "Competitions Product Panel"; - container.initialize(); - - container.isDraggeable = true; - container.isZoomeable = false; - - thisObject.container = container; - thisObject.container.frame.containerName = "Competitions"; - - let isInitialized = false; - let productCards = []; - - return thisObject; - - function initialize() { - - thisObject.container.frame.width = 300; - thisObject.container.frame.height = viewPort.visibleArea.bottomRight.y - viewPort.visibleArea.topLeft.y + 15; - - var position = { - x: viewPort.visibleArea.bottomRight.x - thisObject.container.frame.width, - y: 0 - }; - - thisObject.container.frame.position = position; - - /* Needed Variables */ - - var lastY = 5; - - /* First thing is to build the productCards array */ - - let devTeams = ecosystem.getTeams(); - - for (let i = 0; i < devTeams.length; i++) { - - let devTeam = devTeams[i]; - - for (let j = 0; j < devTeam.bots.length; j++) { - - let bot = devTeam.bots[j]; - - for (let k = 0; k < bot.products.length; k++) { - - let product = bot.products[k]; - - /* Now we create Product objects */ - - let productCard = newProductCard(); - - productCard.devTeam = devTeam; - productCard.bot = bot; - productCard.product = product; - - productCard.code = devTeam.codeName + '-' + bot.codeName + '-' + product.codeName; - - /* Initialize it */ - - productCard.initialize(); - - - /* Container Stuff */ - - productCard.container.displacement.parentDisplacement = thisObject.container.displacement; - productCard.container.zoom.parentZoom = thisObject.container.zoom; - productCard.container.frame.parentFrame = thisObject.container.frame; - productCard.container.parentContainer = thisObject.container; - - /* Positioning within thisObject Panel */ - - let position = { - x: 10, - y: thisObject.container.frame.height - thisObject.container.frame.getBodyHeight() - }; - productCard.container.frame.position.x = position.x; - productCard.container.frame.position.y = position.y + lastY; - - lastY = lastY + productCard.container.frame.height * 1.25; - - /* Add to the Product Array */ - - productCards.push(productCard); - - /* Listen to Status Changes Events */ - - productCard.container.eventHandler.listenToEvent('Status Changed', onProductCardStatusChanged); - - } - } - } - - isInitialized = true; - - } - - function onProductCardStatusChanged(pProductCard) { - - thisObject.container.eventHandler.raiseEvent('Product Card Status Changed', pProductCard); - - } - - function getLoadingCompetitions() { - - /* Returns all productCards which status is ON */ - - let onProducts = []; - - for (let i = 0; i < productCards.length; i++) { - - if (productCards[i].status === PRODUCT_CARD_STATUS.LOADING) { - - onProducts.push(productCards[i]); - } - } - - return onProducts; - } - - function getContainer(point) { - - var container; - - /* First we check if thisObject point is inside thisObject space. */ - - if (thisObject.container.frame.isThisPointHere(point, true) === true) { - - /* Now we see which is the inner most container that has it */ - - - for (var i = 0; i < productCards.length; i++) { - - container = productCards[i].getContainer(point); - - if (container !== undefined) { - - /* We found an inner container which has the point. We return it. */ - - return container; - } - } - - /* The point does not belong to any inner container, so we return the current container. */ - - return thisObject.container; - - } else { - - /* This point does not belong to thisObject space. */ - - return undefined; - } - - } - - - function draw() { - - if (isInitialized === false) { return; } - - thisObject.container.frame.draw(false, false, true); - - for (let i = 0; i < productCards.length; i++) { - productCards[i].draw(); - } - - } - -} \ No newline at end of file diff --git a/Panels/ProductsPanel.js b/Panels/ProductsPanel.js index 27a05087d..8da0683ed 100644 --- a/Panels/ProductsPanel.js +++ b/Panels/ProductsPanel.js @@ -118,7 +118,7 @@ function newProductsPanel() { function getLoadingProductCards() { - /* Returns all productCards which status is ON */ + /* Returns all productCards which status is LOADING */ let onProducts = [];