How can i make group all selected gojs without having name and boundary

i was trying to group some button. so that they fixed together. but i don’t want background color or border.

My code is:

myDiagram = GO(go.Diagram, document.getElementById("myDiagramDiv"), // must name or refer to the DIV HTML element { initialContentAlignment: go.Spot.Center, allowDrop: true, // must be true to accept drops from the Palette "LinkDrawn": showLinkLabel, // this DiagramEvent listener is defined below "LinkRelinked": showLinkLabel, "animationManager.duration": 800, // slightly longer than default (600ms) animation "undoManager.isEnabled": true, // enable undo & redo "dragSelectingTool.isEnabled": false, "commandHandler.archetypeGroupData": { text: "Group", isGroup: true, color: "white",fill:"#000000" }, "animationManager.isEnabled": false, scrollMode: go.Diagram.InfiniteScroll, allowZoom: false, allowHorizontalScroll: false, allowVerticalScroll: false, hasHorizontalScrollbar: false, hasVerticalScrollbar: false, initialPosition: new go.Point(0, 0), padding: 0 } );
And the method which i call for group is:

function groupWebHmi() { if (myDiagram.commandHandler.canGroupSelection()) { myDiagram.commandHandler.groupSelection(); } }

I think your app is using the default Group template. You need to specify the Diagram.groupTemplate, at least. GoJS Groups -- Northwoods Software, and you can search the documentation/samples for more examples.

thank you. but am stuck again. I tried to make group template but i get now an error:

myDiagram.groupTemplate = $(go.Group, "Vertical", { selectionObjectName: "PANEL", // selection handle goes around shape, not label ungroupable: true }, // enable Ctrl-Shift-G to ungroup a selected Group $(go.TextBlock, { font: "bold 19px sans-serif", isMultiline: false, // don't allow newlines in text editable: true // allow in-place editing by user }, new go.Binding("stroke", "color")), $(go.Panel, "Auto", { name: "PANEL" }, $(go.Shape, "Rectangle", // the rectangular shape around the members { fill: null, stroke: null, portId: "", cursor: "pointer", // the Shape is the port, not the whole Node // allow all kinds of links from and to this port fromLinkable: true, fromLinkableSelfNode: true, fromLinkableDuplicates: true, toLinkable: true, toLinkableSelfNode: true, toLinkableDuplicates: true }), $(go.Placeholder, { margin: 10, background: "transparent" }) // represents where the members are ), { // this tooltip Adornment is shared by all groups toolTip: $(go.Adornment, "Auto", $(go.Shape, { fill: "#FFFFCC" }), $(go.TextBlock, { margin: 4 }, // bind to tooltip, not to, to allow access to Group properties new go.Binding("text","tooltip")) ) } );

the error are:

Uncaught Error: Diagram.groupTemplate value is not an instance of Group: [object Object] at Object.k (<anonymous>:14:21) at Object.yd (<anonymous>:15:480) at Object.G (<anonymous>:14:249) at D.<anonymous> (<anonymous>:899:118) at gojsModelDefine (<anonymous>:790:29) at init (<anonymous>:8:25) at <anonymous>:4:9


Uncaught Error: Panel.type value is not an instance of a constant of class Panel: function (a,b){return new m.fn.init(a,b)} at Object.k (<anonymous>:14:21) at Object.yd (<anonymous>:15:480) at Object.mb (<anonymous>:15:99) at HTMLDocument.C (<anonymous>:1092:53) at j (<anonymous>:2:27309) at Object.fireWith [as resolveWith] (<anonymous>:2:28122) at ready (<anonymous>:2:29956)

can you please help me to resolve my problem.

Thanks And Regards

What’s the value of $ when you execute that code to initialize Diagram.groupTemplate?

thank you for correcting my mistake. it started with GO to initialize. But i got another error.

Uncaught Error: Invalid node template in Diagram.nodeTemplateMap: template for "Group" must be a Node or a simple Part, not a Group or Link: Group#1127 at Object.k (<anonymous>:14:21) at (<anonymous>:883:134) at Ln.<anonymous> (<anonymous>:898:401) at Object.Fu (<anonymous>:27:37) at bp (<anonymous>:1078:276) at $o (<anonymous>:1073:183) at addPalette (<anonymous>:837:13) at init (<anonymous>:11:25) at <anonymous>:4:9

can you tell me please now what’s wrong?
if i write go.Node then i get error “ungroupable” undefined property.

That error is correct because every template in Diagram.groupTemplateMap must be a Group and every template in Diagram.nodeTemplateMap must be a Node or simple Part, but not a Link or a Group.

Thank so very much for helping me.