@useche_dev wrote:
Hi, everyone, I have a problem when I implement RoundedRectangle on a Shape. Border is added and I can modify it with the strokeWith, but in the corners, the original rectangular shape persists. I can’t find a way to get rid of that excess and get the corners rounded properly. The Shape is inside a Group. Thanks in advance.
This is my code:
this.dia.groupTemplateMap.add("OfGroups", $(go.Group, "Auto", { mouseDrop: finishDrop, handlesDragDropForMembers: true, mouseDragEnter: function(e, grp, prev) { highlightGroup(e, grp, true); }, mouseDragLeave: function(e, grp, next) { highlightGroup(e, grp, false); }, memberAdded: updateGroupCount, memberRemoved: updateGroupCount, layout: $(go.GridLayout, { wrappingColumn: 1 }) }, new go.Binding("background", "isHighlighted", function(h) { return h ? "rgba(255,0,0,0.2)" : "transparent"; }).ofObject(), $(go.Shape, "RoundedRectangle", new go.Binding("background", "background"), { background: '#E2E2EA', fill: null, stroke: "#E2E2EA", strokeWidth: 1}), $(go.Panel, "Vertical", // title above Placeholder $(go.Panel, "Horizontal", // button next to TextBlock { stretch: go.GraphObject.Horizontal, background: "#E2E2EA" }, new go.Binding("background", "background"), new go.Binding("width", "width"), new go.Binding("height", "height"), $(go.TextBlock, { alignment: go.Spot.Top, editable: false, margin: 5, font: "bold 18px sans-serif", opacity: 0.75, }, new go.Binding("stroke", "stroke"), new go.Binding("text", "text").makeTwoWay()) ), $(go.Placeholder, {padding: 12, alignment: go.Spot.TopLeft }), ), // end Vertical Panel )); // end Group and call to add to template Map
Posts: 7
Participants: 2