Default Code Text

This commit is contained in:
Luis Fernando Molina committed 2019-05-29 12:17:05 +02:00
1 parent efc445c3c9
commit e5f78de16f
2 files changed
+7 -2

No files matched your search

+1
View File
@@ -135,6 +135,7 @@ if (testUser !== null) {
}
const DEFAULT_FORMULA_TEXT = '// Write your formula here'
const DEFAULT_CODE_TEXT = '// Write your code here'
const USDT_BTC_HTH = 19900; // This is needed to know the scale of the market time line.
@@ -409,7 +409,9 @@ function newPartsFromNodes () {
function addCode (node) {
if (node.code === undefined) {
node.code = {}
node.code = {
code: DEFAULT_CODE_TEXT
}
createPart('Code', '', node.code, node, node)
}
}
@@ -453,7 +455,9 @@ function newPartsFromNodes () {
let m = situation.conditions.length
let condition = {
name: 'New Condition',
code: {}
code: {
code: DEFAULT_CODE_TEXT
}
}
situation.conditions.push(condition)
createPart('Condition', condition.name, condition, situation, situation, 'Condition')