Default Code Text
This commit is contained in:
1 parent
efc445c3c9
commit
e5f78de16f
2 files changed
+7
-2
No files matched your search
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user