Try updated scripts and .ts here -
https://mindfusion.eu/_beta/typescript_customdraw.zip1. The definition file now lets you do custom drawing from Typescript instead of using attached nodes, which should give you better performance -
function onUpdateVisuals(item: MindFusion.Diagramming.DiagramItem): void
{
var rect = item.bounds;
var rectPath = new MindFusion.Drawing.Path();
rectPath.addRect(rect.x + 2, rect.y + 2, 6, rect.height - 4);
rectPath.setPen("#FF0000");
rectPath.setBrush("orange");
item.getGraphicsContent().push(rectPath);
var trianglePath = new MindFusion.Drawing.Path();
trianglePath.moveTo(rect.x + 10, rect.y + rect.height / 2);
trianglePath.lineTo(rect.x + 30, rect.y + rect.height / 2);
trianglePath.lineTo(rect.x + 20, rect.y + rect.height / 2 + 10);
trianglePath.lineTo(rect.x + 10, rect.y + rect.height / 2);
trianglePath.close();
trianglePath.setPen("FF0000");
trianglePath.setBrush("transparent");
item.getGraphicsContent().push(trianglePath);
var nodeText = new MindFusion.Drawing.Text("text", new MindFusion.Drawing.Rect(rect.x + rect.width, rect.y, 20, 20));
nodeText.setFont(new MindFusion.Drawing.Font("sans-serif", 4, false, true, false));
item.getGraphicsContent().push(nodeText);
}
MindFusion.Diagramming.ShapeNode.prototype.onUpdateVisuals = onUpdateVisuals; // or instance.onUpdateVisuals = onUpdateVisuals;
2. You can find ContainerNode.setFoldIconSize method that lets you assign fixed size to the fold icon so it won't fill your larger caption bars.
Regards,
Slavcho