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:
parent
be46c419dc
commit
cf0c2825eb
@ -186,6 +186,15 @@ RED.palette = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setLabel(nt,$(d),label);
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user