converted j. Tack version to main stack v0.1
This commit is contained in:
86
vgc.html
Normal file
86
vgc.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!--
|
||||
brabantse delta kleuren:
|
||||
#eaf4f1
|
||||
#86bbdd
|
||||
#bad33b
|
||||
#0c99d9
|
||||
#a9daee
|
||||
#0f52a5
|
||||
#50a8d9
|
||||
#cade63
|
||||
#4f8582
|
||||
#c4cce0
|
||||
-->
|
||||
<script src="/valveGroupControl/menu.js"></script> <!-- Load the menu script for dynamic dropdowns -->
|
||||
<script src="/valveGroupControl/configData.js"></script> <!-- Load the config script for node information -->
|
||||
|
||||
<script>
|
||||
RED.nodes.registerType('valveGroupControl',{
|
||||
category: "EVOLV",
|
||||
color: "#eaf4f1",
|
||||
defaults: {
|
||||
// Define default properties
|
||||
name: { value: "" },
|
||||
|
||||
// Logger properties
|
||||
enableLog: { value: false },
|
||||
logLevel: { value: "error" },
|
||||
|
||||
// Physical aspect
|
||||
positionVsParent: { value: "" },
|
||||
positionLabel: { value: "" },
|
||||
positionIcon: { value: "" },
|
||||
},
|
||||
inputs:1,
|
||||
outputs:3,
|
||||
inputLabels: ["Input"],
|
||||
outputLabels: ["process", "dbase", "parent"],
|
||||
icon: "font-awesome/fa-tachometer",
|
||||
|
||||
label: function () {
|
||||
return this.positionIcon + " " + "valveGroupControl";
|
||||
},
|
||||
oneditprepare: function() {
|
||||
// Initialize the menu data for the node
|
||||
const waitForMenuData = () => {
|
||||
if (window.EVOLV?.nodes?.valveGroupControl?.initEditor) {
|
||||
window.EVOLV.nodes.valveGroupControl.initEditor(this);
|
||||
} else {
|
||||
setTimeout(waitForMenuData, 50);
|
||||
}
|
||||
};
|
||||
// Wait for the menu data to be ready before initializing the editor
|
||||
waitForMenuData();
|
||||
|
||||
},
|
||||
oneditsave: function(){
|
||||
const node = this;
|
||||
|
||||
// Validate logger properties using the logger menu
|
||||
if (window.EVOLV?.nodes?.valveGroupControl?.loggerMenu?.saveEditor) {
|
||||
success = window.EVOLV.nodes.valveGroupControl.loggerMenu.saveEditor(node);
|
||||
}
|
||||
|
||||
// save position field
|
||||
if (window.EVOLV?.nodes?.valveGroupControl?.positionMenu?.saveEditor) {
|
||||
window.EVOLV.nodes.valveGroupControl.positionMenu.saveEditor(this);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-template-name="valveGroupControl">
|
||||
|
||||
<!-- Logger fields injected here -->
|
||||
<div id="logger-fields-placeholder"></div>
|
||||
|
||||
<!-- Position fields injected here -->
|
||||
<div id="position-fields-placeholder"></div>
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="valveGroupControl">
|
||||
<p>A valveGroupControl node</p>
|
||||
</script>
|
||||
Reference in New Issue
Block a user