Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Removes only child fibres froma tube node
- // other nodes are retained
- var fibreList= [
- "1-Blue",
- "2-Orange",
- "3-Green",
- "4-Brown",
- "5-Slate",
- "6-White",
- "7-Red",
- "8-Black",
- "9-Yellow",
- "10-Violet",
- "11-Rose",
- "12-Aqua"
- ];
- var leaf=node.children;
- leaf.forEach(delete_fibres);
- function delete_fibres(item) {
- if (fibreList.indexOf(item.text) != -1) {
- item.delete();
- };
- };
- c.statusInfo = "Tube fibres deleted";
Add Comment
Please, Sign In to add comment