@YogeshMohan wrote:
hey can any one tell me that how can add an image icon on Node ..
using this but it's not working..
$scope.myDiagram.nodeTemplateMap.add("Node", // the default category
$(go.Node, "Spot", nodeStyle(),
$(go.Panel, "Auto",
$(go.Picture, {
source: "/Views/HtmlCont/img1.png",
desiredSize: new go.Size(150, 50),
imageStretch: go.GraphObject.Fill
}),
{ contextMenu: $(go.Adornment) },
$(go.Shape, "RoundedRectangle",
{ fill: "#00A9C9", stroke: null, name: "SHAPE" }, new go.Binding("fill", "color"),new go.Binding("figure", "figure")), $(go.TextBlock, { font: "bold 9pt Helvetica, Arial, sans-serif", stroke: lightText, margin: 8, minSize: new go.Size(160, NaN), maxSize: new go.Size(160, NaN), //wrap: go.TextBlock.WrapFit, textAlign: "center", editable: false, }, new go.Binding("text").makeTwoWay()), { toolTip: // define a tooltip for each node that displays the color as text $(go.Adornment, "Auto", $(go.Shape, { fill: "#CCFFCC" }), $(go.TextBlock, { margin: 4 }, new go.Binding("text", "", diagramNodeInfo)) ) // end of Adornment } ), // four named ports, one on each side: makePort("T", go.Spot.Top, false, true), makePort("L", go.Spot.Left, true, true), makePort("R", go.Spot.Right, true, true), makePort("B", go.Spot.Bottom, true, false) ));
Posts: 4
Participants: 2