1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Expand palette category when first entry added

This commit is contained in:
Nick O'Leary 2015-03-28 21:46:27 +00:00
parent be46c419dc
commit cf0c2825eb

View File

@ -186,6 +186,15 @@ RED.palette = (function() {
}
setLabel(nt,$(d),label);
var categoryNode = $("#palette-container-"+category);
if (categoryNode.find(".palette_node").length === 1) {
if (!categoryNode.find("i").hasClass("expanded")) {
categoryNode.find(".palette-content").slideToggle();
categoryNode.find("i").toggleClass("expanded");
}
}
}
}