Closed sumitshinde-84 closed 9 months ago
Hi @joepavitt, could you please share your thoughts on this issue?
This is the same problem you had before with width
and height
, you need to nest the property inside the defaults
object inside the ui-webcam.html
I have already added that property in the defaults
object. , see https://github.com/sumitshinde-84/node-red-dashboard-2-ui-webcam/blob/e6bea7fcd8cabb54037fc818809d8638d561db48/nodes/ui-webcam.html#L20C8-L20C36
That isn't in the defaults
object, that's in the higher Node config. The defaults
object is: https://github.com/sumitshinde-84/node-red-dashboard-2-ui-webcam/blob/e6bea7fcd8cabb54037fc818809d8638d561db48/nodes/ui-webcam.html#L6-L16
Yes, I have also tried moving the passthrough between the width and group properties (in defaults obj).
Okay, so 2 things:
ui-dropdown.html
in Dashboard 2.0:<div class="form-row">
<label style="width:auto" for="node-input-passthru"><i class="fa fa-arrow-right"></i> If <code>msg</code> arrives on input, pass through to output: </label>
<input type="checkbox" checked id="node-input-passthru" style="display:inline-block; width:auto; vertical-align:top;">
</div>
This isn't the breaking problem, but worth noting nonetheless.
onInput
event function in ui-webcam.js
, which overrides the default behaviour we have in Dashboard 2.0, and which include the check for passthru
. So you have two options here, remove your custom onInput
, as you're not doing anything bespoke that the default handler doesn't already do, or implement the passthru
logic yourself in your onInput
function. I recommend removing your custom onInput
.I do appreciate though, this isn't an intuitive step given that you have to specify true
for onAction
, and it's not mentioned in the ui-example
project that the onInput
is overriding a default behaviour. I'll get the example improved.
Thanks, @joepavitt , for your suggestions. I will try to resolve the issue based on your suggestions. Also, I am pretty sure that the second suggestion which about onInput
will work.
I have submitted #10 to add passthrou: { value: false } in ui-webcam.html default object. I have tested that locally; however, the message from the previous node is still passing through ui-webcam.
https://github.com/sumitshinde-84/node-red-dashboard-2-ui-webcam/assets/110285294/fc6e7a3e-ae64-422c-8dcc-a211e97900d5