@mohanr.k wrote:
I implemented a custom palette to show Custom Objects as Data Object but as shown in below screenshot I see lot of empty space on left side. I am not able to figure out what is the issue here
I tried setting contentAlignment and locationSpot to left and also float:left in css for div element
Below is the Palette and nodeTemplate code
goObj(go.Palette, "myDiv", { // share the templates with the main Diagram nodeTemplateMap: _this.palNodeTemplateMap, groupTemplateMap: _this.palGroupTemplateMap, contentAlignment:go.Spot.Left, layout: goObj(go.GridLayout, { cellSize: new go.Size(1, 1), spacing: new go.Size(5, 5), comparer: _this.keyCompare }) });Node Template
let dataObjectNodeTemplate:any =
goObj(go.Node, "Vertical",
{ locationObjectName: "SHAPE", locationSpot: go.Spot.Left },
new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
goObj(go.Shape, "File",
{
name: "SHAPE", portId: "", fromLinkable: true, toLinkable: true, cursor: "pointer",
fill: this.DataFill, desiredSize: new go.Size(this.EventNodeSize * 0.8, _this.EventNodeSize)
}
),
goObj(go.TextBlock,
{ margin: 2, editable: true,font:_this.defaultFont },
new go.Binding("text").makeTwoWay()
)
);
Posts: 2
Participants: 2
