mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Updated Design: Dynamic node's icon (markdown)
parent
56d948a792
commit
a241db25b7
@ -84,14 +84,7 @@ Necessary actions to realize this proposal:
|
|||||||
## Select icon
|
## Select icon
|
||||||
User can select an icon on the node settings tab. Once you click `OK` button, the node icon will change.
|
User can select an icon on the node settings tab. Once you click `OK` button, the node icon will change.
|
||||||
|
|
||||||
## Unknown icon
|
Restriction: If a node has `icon` property by default, a user cannot select a user defined icon (e.g. ui_button node in node-red-dashboard).
|
||||||
There are two cases that cause unknown icon.
|
|
||||||
- Node-defined icon does not exist.
|
|
||||||
- Cause: The definition of a contribution node has a problem.
|
|
||||||
- Handling: Show arrow-in.png. (as is)
|
|
||||||
- User-defined icon path does not exist although node-defined icon exists.
|
|
||||||
- Cause: Export a flow that uses an icon from a 3rd party module, and import the flow on the other Node-RED that does not install the 3rd party module.
|
|
||||||
- Handling: Show node-defined icon on behalf of user-defined icon. Show node-error.png icon on the top of the node, and surround the input field of icon in `node settings` section with red frame.
|
|
||||||
|
|
||||||
# API design
|
# API design
|
||||||
## Icon property of flow data
|
## Icon property of flow data
|
||||||
@ -122,12 +115,14 @@ Returns a list of all icon files available in the editor for each module.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The icons in the following directory will be traversed when Node-RED starts running.
|
||||||
|
- `icons` directory in the installed node module.
|
||||||
|
- `$HOME/.node-red/lib/icons`
|
||||||
|
|
||||||
# Candidates of enhancement
|
# Candidates of enhancement
|
||||||
- Add "enableIconChange" parameter in settings.js to enable/disable this feature.
|
- Add "enableIconChange" parameter in settings.js to enable/disable this feature.
|
||||||
- Default value is true.
|
- Default value is true.
|
||||||
- Enable it to choose font-awesome and material design icon.
|
- Enable it to choose font-awesome icon.
|
||||||
- Changeable node color
|
|
||||||
- Show a node type:
|
- Show a node type:
|
||||||
- during mouse over
|
- during mouse over
|
||||||
- in a small icon or string
|
- in a small icon or string
|
||||||
|
Loading…
Reference in New Issue
Block a user