I am trying to start the Palette from left. But I can’t find any styling for that. Please help.
This is my code
private initPalette(): go.Palette {
var $ = go.GraphObject.make;
console.log("sddsds")
let myPalette =
$(go.Palette, // must name or refer to the DIV HTML element
{
maxSelectionCount: 1,
autoScale: go.Diagram.Uniform,
// groupTemplateMap: myDiagram.groupTemplateMap,
// share the templates used by myDiagram
linkTemplate: // simplify the link template, just in this Palette
$(go.Link,
{ // because the GridLayout.alignment is Location and the nodes have locationSpot == Spot.Center,
// to line up the Link in the same manner we have to pretend the Link has the same location spot
locationSpot: go.Spot.Center,
selectionAdornmentTemplate:
$(go.Adornment, "Link",
{ locationSpot: go.Spot.Center },
$(go.Shape,
{ isPanelMain: true, fill: null, stroke: "deepskyblue", strokeWidth: 0 }),
$(go.Shape, // the arrowhead
{ toArrow: "Standard", stroke: null })
)
},
{
routing: go.Link.AvoidsNodes,
curve: go.Link.JumpOver,
corner: 5,
toShortLength: 4
},
new go.Binding("points"),
$(go.Shape, // the link path shape
{ isPanelMain: true, strokeWidth: 2 }),
$(go.Shape, // the arrowhead
{ toArrow: "Standard", stroke: null })
),
});
myPalette.nodeTemplate =
$(go.Node, "Auto",
{ alignment: go.Spot.TopLeft },
// $(go.Shape,
// { width: 14, height: 14, fill: "white" },
// new go.Binding("fill", "color")),
$(go.Shape, { strokeWidth: 0, fill: "#f1f5fc" }),
$(go.TextBlock,
{ margin: 0, width: 130, font: "normal 600 15px Arial, Helvetica", background: "#f1f5fc", textAlign: "start" },
new go.Binding("text", "name"))
);
myPalette.groupTemplate =
$(go.Group, "Auto",
{ alignment: go.Spot.TopLeft },
// $(go.Shape,
// { width: 14, height: 14, fill: "white" },
// new go.Binding("fill", "color")),
$(go.Shape, { strokeWidth: 0, fill: "#f1f5fc" }),
$(go.TextBlock,
{ margin: 4, width: 150, font: "normal small-caps 900 15px Sans, Serif", background: "#f1f5fc", textAlign: "start" },
new go.Binding("text", "text"))
);
// myPalette.model.nodeKeyProperty = myDiagram.model.nodeKeyProperty;
myPalette.model = new go.GraphLinksModel([]);
myPalette.model.nodeKeyProperty = "key1";
myPalette.animationManager.initialAnimationStyle = go.AnimationManager.None;
return myPalette;
}