@3q wrote:
function makeArc(data) { return new go.Geometry() .add(new go.PathFigure(data.radius + data.radius * Math.cos(data.start * Math.PI / 180), data.radius + data.radius * Math.sin(data.start * Math.PI / 180), false) .add(new go.PathSegment(go.PathSegment.Arc, data.start, data.sweep, data.radius, data.radius, data.radius, data.radius) )); } var arc_sketchTemplate = g_(go.Node, "Viewbox",{ resizable: true, resizeObjectName: "LAMP", rotatable: true, locationSpot: go.Spot.Center, locationObjectName: "LAMP", //selectionAdorned: false, selectionObjectName: "LAMP", background: null }, new go.Binding("angle","angle").makeTwoWay(), new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding("layerName", "isSelected", function(s) { return s ? "Foreground" : ""; }).ofObject(), g_(go.Panel, "Spot", g_(go.Shape, // arc { name: "LAMP", fill: null, stroke: "rgba(0,0,0,1)", strokeWidth: 2, alignment: new go.Spot(0,0,0,0) }, new go.Binding("stroke","color"), new go.Binding("strokeWidth","thickness").makeTwoWay(), new go.Binding("geometry", "", makeArc), new go.Binding("desiredSize","desiredSize",go.Size.parse).makeTwoWay(go.Size.stringify)), g_(go.TextBlock, { editable: true, _isNodeLabel: true, alignment: new go.Spot(0.5,1,0,20), cursor: "pointer", stroke: "rgba(0,0,0,1)", background: "transparent" }, new go.Binding("font","font"), new go.Binding("stroke","text_color"), new go.Binding("alignment").makeTwoWay(), new go.Binding("text", "text")) ));
As shown in the figure, the graphics area is significantly smaller than the selected area.
I want the selected region to be exactly the actual area. What should I do?
Posts: 2
Participants: 2