@praveentc6 wrote:
Hi Team,
We are working on an application in which when we give "create diagram" it opens a canvas page with node palette at the left side. We need a label which should come at top center on load of the canvas page.
For that we tried hard coding position(loc : "0 0") to the label in node data array. For whatever positions we give to the label it is visibly coming at the middle of the canvas page only.
We tried using intialContentAlignment, it works for label but when we drag and drop other nodes that will take that intialContentAlignment value and push the label downwards .PFB code where we are hardcoding label position:
nodeData.push({
category:"Labels",
color:"black",
deletable:true,
desc:"Click here to add title",
fill:"white",
font:"normal 20pt Segoe UI, Arial, sans-serif",
imagePath:"imgpath",
isDragged:false,
key:"Label-1",
label:"Click here to add title",
size:"740 38",
loc:"0 0",
name:"Label",
parent:"designTool",
stroke:"black",
text:"Label",
zOrder:10
});
Thanks,
Praveen
Posts: 1
Participants: 1