@nkindia wrote:
My code:
diagram = $(go.Diagram, ‘canvasDiv’, {
allowMove: false,
allowVerticalScroll: false,
allowHorizontalScroll: false,
initialContentAlignment: go.Spot.TopLeft,
padding: 0 // center
});diagram.grid.visible = true; diagram.grid.gridCellSize = new go.Size(50, 50); diagram.grid.gridOrigin = new go.Point(0, 0) diagram.add( $(go.Node, $(go.Shape, { geometryString: "M0 100 H" + diagram.viewportBounds.width, stroke: "lightgreen" }))); diagram.add( $(go.Node, $(go.Shape, { geometryString: "M0 50 H" + diagram.viewportBounds.width, stroke: "lightgreen" })));This yields me a grid layout diagram, with only one horizontal line from 0,100 to the right end of the canvas.
The second node does not render the horizontal line from 0, 50.
The same happens even when i add the 0,50 Horizontal line node first. This time it renders line from the 0,50 to right end of the canvas, but 0,100 line node does not render.
What am I missing ?
Thanks!
Posts: 1
Participants: 1