@GSA wrote:
I have a palette with nodes like this:
I'd like to center align the nodes, how would I go about doing this? The initial palette code is like this:
var palette = $(go.Palette, "palette", { nodeTemplateMap: myDiagram.nodeTemplateMap, autoScale: go.Diagram.Uniform }); palette.model.nodeDataArray = [ { category: EquipmentNodeType.CAMERA, id: "0", nodeType: EquipmentNodeType.CAMERA, text: "Kamera" }, { category: EquipmentNodeType.SIGN, id: "0", nodeType: EquipmentNodeType.SIGN, text: "Skilt" } ];I've found properties for the palette such as layout: $(go.Gridlayout), but so far my attempts at trying to use it to center align these nodes have failed.
The right-side palette here: https://gojs.net/latest/intro/palette.html
Does seem to have the kind of behavior I want, but it has separate nodes for the palette. And when I tried using the locationObjectName/locationSpot properties on my nodes and the gridlayout it didn't change anything with my palette, as well as messing up my diagram.
Posts: 3
Participants: 2