Hi folks,
In my latest UI node I have (like in my other UI nodes) a normal elementsizer widget:
Which is created like this:
oneditprepare: function() {
$("#node-input-size").elementSizer({
width: "#node-input-width",
height: "#node-input-height",
group: "#node-input-group"
});
}
Works fine!
However in this case I need to dynamically change the width and height, based on a checkbox in the config screen. But the width and height in the element sizer box remain unchanged (i.e. "6x-1"). Even when I call the elementSize again (and I don't even know if this causes duplicates or other conflicts...):
oneditprepare: function() {
$('#node-input-allowVideoDisplay').change(function () {
if (this.checked) {
if ($('#node-input-height').val() == -1) {
// THESE NEW VALUES ARE NOT DISPLAYED IN THE ELEMENT SIZER ;-(
$('#node-input-height').val(0);
$('#node-input-width').val(0);
// CALLING THIS ONE AGAIN DOESN'T HELP EITHER ...
$("#node-input-size").elementSizer({
width: "#node-input-width",
height: "#node-input-height",
group: "#node-input-group"
});
}
}
...
}
Can I somehow refresh the element sizer, or should I removed some things from the DOM, or ...
Thanks !!!
Bart