Layers Being Plotted, not in right order though
This commit is contained in:
1 parent
5d4fb7e5b7
commit
25e1eea445
3 files changed
+16
-7
No files matched your search
@@ -149,7 +149,7 @@ function newPlottersManager () {
|
||||
}
|
||||
}
|
||||
|
||||
storage.initialize(pProductCard.devTeam, pProductCard.bot, undefined, pProductCard.product, exchange, market, datetime, timePeriod, onProductStorageInitialized)
|
||||
storage.initialize(pProductCard.devTeam, pProductCard.bot, pProductCard.session, pProductCard.product, exchange, market, datetime, timePeriod, onProductStorageInitialized)
|
||||
|
||||
function onProductStorageInitialized (err) {
|
||||
try {
|
||||
|
||||
@@ -611,6 +611,15 @@ function newProductCard () {
|
||||
/* product */
|
||||
fontSize = 10
|
||||
label = thisObject.product.displayName
|
||||
|
||||
if (thisObject.session !== undefined) {
|
||||
const MAX_LABEL_LENGTH = 30
|
||||
if (thisObject.session.name > MAX_LABEL_LENGTH) {
|
||||
label = thisObject.session.name.substring(0, MAX_LABEL_LENGTH) + '...' + ' - ' + label
|
||||
} else {
|
||||
label = thisObject.session.name + ' - ' + label
|
||||
}
|
||||
}
|
||||
labelPoint = {
|
||||
x: 65,
|
||||
y: thisObject.container.frame.height / 2 + 15
|
||||
|
||||
@@ -87,7 +87,7 @@ function newProductsPanel () {
|
||||
isInitialized = true
|
||||
}
|
||||
|
||||
function addProductCard (devTeam, bot, product, instance) {
|
||||
function addProductCard (devTeam, bot, product, session) {
|
||||
/* Now we create Product objects */
|
||||
let productCard = newProductCard()
|
||||
|
||||
@@ -97,9 +97,10 @@ function newProductsPanel () {
|
||||
productCard.fitFunction = thisObject.fitFunction
|
||||
productCard.code = exchange + '-' + market.assetB + '/' + market.assetA + '-' + devTeam.codeName + '-' + bot.codeName + '-' + product.codeName
|
||||
|
||||
if (instance !== undefined) {
|
||||
productCard.code = productCard.code + '-' + instance
|
||||
if (session !== undefined) {
|
||||
productCard.code = productCard.code + '-' + session.id
|
||||
}
|
||||
productCard.session = session
|
||||
|
||||
/* Initialize it */
|
||||
productCard.initialize()
|
||||
@@ -291,11 +292,10 @@ function newProductsPanel () {
|
||||
if (product.codeName === layerCode.product) {
|
||||
/* We have a layer that is matching the current product */
|
||||
|
||||
let instance = process.session.name + '-' + process.session.id
|
||||
let cardCode = exchange + '-' + market.assetB + '/' + market.assetA + '-' + devTeam.codeName + '-' + bot.codeName + '-' + product.codeName + '-' + instance
|
||||
let cardCode = exchange + '-' + market.assetB + '/' + market.assetA + '-' + devTeam.codeName + '-' + bot.codeName + '-' + product.codeName + '-' + process.session.id
|
||||
|
||||
if (cardsMap.get(cardCode) === undefined) {
|
||||
addProductCard(devTeam, bot, product, instance)
|
||||
addProductCard(devTeam, bot, product, process.session)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user