Christian-Me / node-red-contrib-ui-iro-color-picker

Node-RED dashboard color picker widget utilizing the iro.js library. Can be configured as a widget or modal popup window. Individual components can be combined,
Apache License 2.0
4 stars 3 forks source link

TypeError #9

Closed fk-online closed 2 years ago

fk-online commented 2 years ago

Hi!

No colorpicker is displayed after the node has been integrated.

Error 1

In the browser console (tested with Firefox and Chrome) the following error is displayed:

TypeError: opts.layout[0] is undefined createIro app.min.js line 592 > eval:117 createIro app.min.js line 592 > eval:114 init app.min.js line 592 > eval:204 ... console-export-2022-1-30_16-29-5.txt

I have already tried to reinstall node red completely. The only node used is the colorpicker.

Node Red version: 2.2.0 Dashboard version: 3.1.5

Node Red is running on Debian 11.2

Flow: [ { "id": "58bdf1e48dfdf921", "type": "tab", "label": "Flow 1", "disabled": false, "info": "", "env": [] }, { "id": "0aca1551a2c71de3", "type": "ui_iro-color-picker", "z": "58bdf1e48dfdf921", "group": "46522b44b4498871", "order": 0, "width": 0, "height": 0, "name": "", "label": "Test", "placement": "left", "hAlign": "flex-start", "vAlign": "flex-start", "stateField": "payload", "enableField": "enable", "layoutDirection": "vertical", "widgetIndent": "3", "buttonWidth": "2", "pickerType": "widget", "popupWidth": 0, "popupHeight": 0, "pickerSize": "100", "backgroundDim": "50", "backgroundColor": "#000000", "backgroundVariable": false, "components": [], "format": "hex", "outFormat": "rgb", "dynOutput": "input:end", "outputConfirmed": false, "outputLimit": "10", "passthru": false, "topic": "topic", "topicType": "msg", "iroColorValue": "#ff0000", "x": 350, "y": 240, "wires": [ [] ] }, { "id": "46522b44b4498871", "type": "ui_group", "name": "Standard", "tab": "bc3a8e347afad644", "order": 1, "disp": true, "width": "6", "collapse": false, "className": "" }, { "id": "bc3a8e347afad644", "type": "ui_tab", "name": "Home", "icon": "dashboard", "disabled": false, "hidden": false } ]

Devilsmaul commented 2 years ago

hey, have you tried to add a component in the node settings? There are 2 tabs [General, Components]. i run yesterday into the same. Maybe it would make sense here to use the picker as default component?

Christian-Me commented 2 years ago

Thank you for your feedback! You have to select at least one component.

And Yes, there should be a validation check in some shape or form if no component was added. Think the best way should be to use the Node-RED validation "concept" = red triangle. I have to look into it a little bit deeper how it works for more complex inputs like the editable list.

Adding a default configuration like a picker AND a brightness slider could help. Many users before has issues with "un-complete" color models

fk-online commented 2 years ago

Thank you for the fast response. I completely missed the add button, otherwise it would have been clear. Now it works as it should. The suggested validation would certainly be desirable for future users.

Thank you very much you have done a great job in creating this node!