@kitazaki/node-red-contrib-mcu-display-image
Version:
display JPEG/PNG with Node-RED MCU
74 lines (68 loc) • 2.69 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('mcu_displayjpeg',{
category: 'MCU',
color: '#a6bbcf',
defaults: {
name: { value: "" },
xoffset: { value: "0", required: true },
yoffset: { value: "0", required: true },
moddable_manifest: {
value: {
include: "manifest.json"
}
}
},
inputs:1,
outputs:1,
icon: "font-awesome/fa-image",
label: function() {
return this.name || "mcu_displayjpeg";
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('mcu_displaypng',{
category: 'MCU',
color: '#a6bbcf',
defaults: {
name: { value:"" },
xoffset: { value: "0", required: true },
yoffset: { value: "0", required: true },
moddable_manifest: {
value: {
include: "manifest.json"
}
}
},
inputs:1,
outputs:1,
icon: "font-awesome/fa-image",
label: function() {
return this.name || "mcu_displaypng";
}
});
</script>
<script type="text/html" data-template-name="mcu_displayjpeg">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"><br>
<label for="node-input-xoffset"><i class="fa fa-tag"></i> X offset</label>
<input type="number" id="node-input-xoffset" style="width:80px"><br>
<label for="node-input-yoffset"><i class="fa fa-tag"></i> Y offset</label>
<input type="number" id="node-input-yoffset" style="width:80px"><br>
</div>
</script>
<script type="text/html" data-template-name="mcu_displaypng">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name"><br>
<label for="node-input-xoffset"><i class="fa fa-tag"></i> X offset</label>
<input type="number" id="node-input-xoffset" style="width:80px"><br>
<label for="node-input-yoffset"><i class="fa fa-tag"></i> Y offset</label>
<input type="number" id="node-input-yoffset" style="width:80px"><br>
</div>
</script>
<script type="text/html" data-help-name="mcu_displayjpeg">
</script>
<script type="text/html" data-help-name="mcu_displaypng">
</script>