taking the snapshot at the Protter Manager

This commit is contained in:
Luis Fernando Molina committed 2019-12-04 19:49:11 +01:00
1 parent 7fb1a1ff35
commit 1b57aab9e2
2 files changed
+8 -7

No files matched your search

+6 -1
View File
@@ -169,9 +169,14 @@ function newPlottersManager () {
}
/* Now we have all the initial data loaded and ready to be delivered to the new instance of the plotter. */
let plotter
let productDefinition
if (pProductCard.product.plotter.legacy === false) {
plotter = newPlotter()
/* We take a snapwhot of the current product definition to be used by the plotter. */
let functionLibraryProtocolNode = newProtocolNode()
productDefinition = functionLibraryProtocolNode.getProtocolNode(pProductCard.product.node, false, true, true, false, false, true)
} else {
plotter = getNewPlotter(pProductCard.product.plotter.devTeam, pProductCard.product.plotter.codeName, pProductCard.product.plotter.moduleName)
}
@@ -180,7 +185,7 @@ function newPlottersManager () {
plotter.container.frame.position.x = thisObject.container.frame.width / 2 - plotter.container.frame.width / 2
plotter.container.frame.position.y = thisObject.container.frame.height / 2 - plotter.container.frame.height / 2
plotter.fitFunction = thisObject.fitFunction
plotter.initialize(storage, exchange, market, datetime, timePeriod, onPlotterInizialized, pProductCard.product.definition)
plotter.initialize(storage, exchange, market, datetime, timePeriod, onPlotterInizialized, productDefinition)
function onPlotterInizialized () {
try {
+2 -6
View File
@@ -170,15 +170,11 @@ function newProductsPanel () {
product.plotter.module = { panels: [] }
product.displayName = productNode.name
product.dataSets = []
product.exchangeList = [{'name': 'Poloniex'}]
product.node = productNode
team.displayName = teamNode.name
team.host = {'url': 'localhost'}
bot.displayName = botNode.name
product.exchangeList = [{'name': 'Poloniex'}]
/* We take a snapwhot of the current product definition to be used by the plotter. */
let functionLibraryProtocolNode = newProtocolNode()
product.definition = functionLibraryProtocolNode.getProtocolNode(productNode, false, true, true, false, false, true)
for (let m = 0; m < productNode.datasets.length; m++) {
let dataset = productNode.datasets[m]