Hi,
I hope I posted this question to correct section of this forum...
I'm evaluating your diagram product for ASP.NET. Though my question is related to javascript.
I'm little confused while using your javascript methods.
I'm trying to create a node to diagramView when [ClickedScript] is fired and within it is set its text alignment, which fails. This is one of your samples:
function canvas_Clicked(sender, e) {
var palette = <%= diagramView_palette.AppletElement %>.getDiagram();
var canvas = <%= diagramView_canvas.AppletElement %>.getDiagram();
if (prototypeNode == null)
prototypeNode = palette.getNodes().get(0);
var node = canvas.getFactory().createShapeNode(x - 24, y - 24, 40, 50);
node.setShape(node.getShape().fromId("RoundRect"));
node.setImage(prototypeNode.getImage());
node.setTransparent(true);
node.setEnabledHandles(MindFusion.Diagramming.Handles.Move);
node.setHandlesStyle(MindFusion.Diagramming.HandlesStyle.MoveOnly);
node.setImageAlign(MindFusion.Diagramming.ImageAlign.TopCenter);
// this one fails (this one is not in any of your samples; just found on the internet):
node.SetTextAlignment(MindFusion.Diagramming.SetText(MindFusion.Diagramming.Align.Center, MindFusion.Diagramming.Align.Far));
node.setText("node " + sender.getNodes().size()); // NOTE: [size] is [count] of nodes in canvas...
}
One good reason could be that the [MindFusion.Diagramming] class doesn't include "Align" nor "SetText" methods. I checked and confirmed that the class includes all others above, but nether one of these.
Then I found out that [Packages.com.mindfusion.diagramming] class includes these and more.
But [node.SetTextAlignment] method doesn't understand these 'values'.
So long question in short. How to set in javascript, created node(s) text alignment correctly.
I appreciate any of your help.