Added comment, made custom code block inputs not required
This commit is contained in:
parent
7a15b1d5e1
commit
f4a613420d
@ -6,31 +6,31 @@ module.exports = {
|
|||||||
inp1: {
|
inp1: {
|
||||||
name: "1",
|
name: "1",
|
||||||
type: "text",
|
type: "text",
|
||||||
required: true,
|
required: false,
|
||||||
inline: false
|
inline: false
|
||||||
},
|
},
|
||||||
inp2: {
|
inp2: {
|
||||||
name: "2",
|
name: "2",
|
||||||
type: "text",
|
type: "text",
|
||||||
required: true,
|
required: false,
|
||||||
inline: false
|
inline: false
|
||||||
},
|
},
|
||||||
inp3: {
|
inp3: {
|
||||||
name: "3",
|
name: "3",
|
||||||
type: "text",
|
type: "text",
|
||||||
required: true,
|
required: false,
|
||||||
inline: false
|
inline: false
|
||||||
},
|
},
|
||||||
inp4: {
|
inp4: {
|
||||||
name: "4",
|
name: "4",
|
||||||
type: "text",
|
type: "text",
|
||||||
required: true,
|
required: false,
|
||||||
inline: false
|
inline: false
|
||||||
},
|
},
|
||||||
inp5: {
|
inp5: {
|
||||||
name: "5",
|
name: "5",
|
||||||
type: "text",
|
type: "text",
|
||||||
required: true,
|
required: false,
|
||||||
inline: false
|
inline: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -40,7 +40,7 @@ module.exports = {
|
|||||||
return customFunc(inputs.inp1, inputs.inp2, inputs.inp3, inputs.inp4, inputs.inp5);
|
return customFunc(inputs.inp1, inputs.inp2, inputs.inp3, inputs.inp4, inputs.inp5);
|
||||||
},
|
},
|
||||||
pageBlock: {
|
pageBlock: {
|
||||||
html: "To access inputs, use vars inp1, inp2, etc<br><textarea name='code'></textarea>",
|
html: "To access inputs, use vars inp1, inp2, etc. Use return to output.<br><textarea name='code'></textarea>",
|
||||||
js: function(block){
|
js: function(block){
|
||||||
if(block.properties.code){
|
if(block.properties.code){
|
||||||
block.elem.find("textarea").val(block.properties.code);
|
block.elem.find("textarea").val(block.properties.code);
|
||||||
|
@ -39,7 +39,7 @@ function resolveOutput(block, cache){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculateOutputBlocks(){
|
function calculateOutputBlocks(){ //resolve the output for frequency and output blocks, their execute functions will handle displaying
|
||||||
var cache = {};
|
var cache = {};
|
||||||
var outputBlocks = diagram.state.filter((block)=>((block.type == "output") || (block.type == "frequency")));
|
var outputBlocks = diagram.state.filter((block)=>((block.type == "output") || (block.type == "frequency")));
|
||||||
for(var block of outputBlocks){
|
for(var block of outputBlocks){
|
||||||
|
Loading…
Reference in New Issue
Block a user