mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
change PR to only use a single property for the 2nd output
This commit is contained in:
parent
88e729664a
commit
127b361979
@ -88,7 +88,6 @@
|
||||
op2type: {value:"val"},
|
||||
duration: {value:"250",required:true,validate:RED.validators.number()},
|
||||
extend: {value:"false"},
|
||||
second: {value:false},
|
||||
units: {value:"ms"},
|
||||
reset: {value:""},
|
||||
bytopic: {value:"all"},
|
||||
@ -123,6 +122,9 @@
|
||||
$("#node-stream-topic").show();
|
||||
}
|
||||
});
|
||||
|
||||
if (this.outputs == 2) { $("#node-input-second").prop('checked', true) }
|
||||
else { $("#node-input-second").prop('checked', false) }
|
||||
|
||||
$("#node-input-second").change(function() {
|
||||
if ($("#node-input-second").is(":checked")) {
|
||||
|
@ -24,7 +24,7 @@ module.exports = function(RED) {
|
||||
this.op2 = n.op2 || "0";
|
||||
this.op1type = n.op1type || "str";
|
||||
this.op2type = n.op2type || "str";
|
||||
this.second = n.second || false;
|
||||
this.second = (n.outputs == 2) ? true : false;
|
||||
this.topic = n.topic || "topic";
|
||||
|
||||
if (this.op1type === 'val') {
|
||||
|
@ -827,7 +827,7 @@ describe('trigger node', function() {
|
||||
});
|
||||
|
||||
it('should be able to send 2nd message to a 2nd output', function(done) {
|
||||
var flow = [{"id":"n1", "type":"trigger", "name":"triggerNode", op1type:"val", op2type:"val", op1:"hello", op2:"world", duration:"50", second:true, wires:[["n2"],["n3"]] },
|
||||
var flow = [{"id":"n1", "type":"trigger", "name":"triggerNode", op1type:"val", op2type:"val", op1:"hello", op2:"world", duration:"50", outputs:2, wires:[["n2"],["n3"]] },
|
||||
{id:"n2", type:"helper"}, {id:"n3", type:"helper"} ];
|
||||
helper.load(triggerNode, flow, function() {
|
||||
var n1 = helper.getNode("n1");
|
||||
|
Loading…
Reference in New Issue
Block a user