diff --git a/Panels/ProductsPanel.js b/Panels/ProductsPanel.js index 9c853cdf1..736e1c254 100644 --- a/Panels/ProductsPanel.js +++ b/Panels/ProductsPanel.js @@ -90,6 +90,7 @@ 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; @@ -125,9 +126,9 @@ function onMouseWheel(pDelta) { if (pDelta > 0) { - pDelta = 1; - } else { pDelta = -1; + } else { + pDelta = 1; } firstVisibleCard = firstVisibleCard + pDelta; diff --git a/ProductCard.js b/ProductCard.js index b4de94894..c385eff40 100644 --- a/ProductCard.js +++ b/ProductCard.js @@ -115,7 +115,7 @@ } else { - changeStatusTo(PRODUCT_CARD_STATUS.LOADING); // This happens the first time the app is run on a new browser. + changeStatusTo(PRODUCT_CARD_STATUS.OFF); // This happens the first time the app is run on a new browser. } diff --git a/server.js b/server.js index 26c3c9067..d4a941aa9 100644 --- a/server.js +++ b/server.js @@ -1360,37 +1360,43 @@ function onBrowserRequest(request, response) { let plotter = devTeam.plotters[j]; - for (let k = 0; k < plotter.modules.length; k++) { + if (plotter.modules !== undefined) { - let module = plotter.modules[k]; + for (let k = 0; k < plotter.modules.length; k++) { - let htmlLineCopy = htmlLinePlotter; + let module = plotter.modules[k]; - let stringToInsert; - stringToInsert = htmlLineCopy.replace('@devTeam@', devTeam.codeName); - stringToInsert = stringToInsert.replace('@repo@', plotter.repo); - stringToInsert = stringToInsert.replace('@module@', module.moduleName); - - let firstPart = fileContent.substring(0, fileContent.indexOf('') + 15); - let secondPart = fileContent.substring(fileContent.indexOf('') + 15); - - fileContent = firstPart + stringToInsert + secondPart; - - for (let l = 0; l < module.panels.length; l++) { - - let panel = module.panels[l]; - - let htmlLineCopy = htmlLinePlotterPanel; + let htmlLineCopy = htmlLinePlotter; let stringToInsert; stringToInsert = htmlLineCopy.replace('@devTeam@', devTeam.codeName); stringToInsert = stringToInsert.replace('@repo@', plotter.repo); - stringToInsert = stringToInsert.replace('@module@', panel.moduleName); + stringToInsert = stringToInsert.replace('@module@', module.moduleName); - let firstPart = fileContent.substring(0, fileContent.indexOf('') + 20); - let secondPart = fileContent.substring(fileContent.indexOf('') + 20); + let firstPart = fileContent.substring(0, fileContent.indexOf('') + 15); + let secondPart = fileContent.substring(fileContent.indexOf('') + 15); fileContent = firstPart + stringToInsert + secondPart; + + if (module.panels !== undefined) { + + for (let l = 0; l < module.panels.length; l++) { + + let panel = module.panels[l]; + + let htmlLineCopy = htmlLinePlotterPanel; + + let stringToInsert; + stringToInsert = htmlLineCopy.replace('@devTeam@', devTeam.codeName); + stringToInsert = stringToInsert.replace('@repo@', plotter.repo); + stringToInsert = stringToInsert.replace('@module@', panel.moduleName); + + let firstPart = fileContent.substring(0, fileContent.indexOf('') + 20); + let secondPart = fileContent.substring(fileContent.indexOf('') + 20); + + fileContent = firstPart + stringToInsert + secondPart; + } + } } } }