Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Add new node without changing/reloading diagram

$
0
0

@akashskan wrote:

Hi Team,

Following is our requirement:

  1. We don’t want to reload/redraw/rearrange our current go graph
  2. We want to add a new node in our current go graph dynamically
  3. The newly added node should be added on the left-hand side
  4. The new node should not overlap the existing node

We have set isOngoing to false to prevent automatic layout every time node data array/link data array is being changed.

When new nodes are currently added, they are overlapping on existing nodes.

Layout being used is TreeLayout.

const processDiagram = ( go.Diagram, id, // create a Diagram for the DIV HTML element { initialContentAlignment: go.Spot.Center, 'undoManager.isEnabled': this.isEditing, 'draggingTool.isEnabled': this.isEditing, // Disables node drag 'panningTool.isEnabled': true, // Disables tree drag allowHorizontalScroll: true, // Disables horizontal scroll allowVerticalScroll: true, // Disables vertical scroll layout: (go.TreeLayout, {
isRealtime: false,
angle: 90,
layerSpacing: this.layerSpacing,
isOngoing: false
}),
initialDocumentSpot: go.Spot.Bottom,
initialViewportSpot: go.Spot.Bottom,
initialAutoScale: go.Diagram.Uniform})

Please let us know what additional information you need.

R,
Akash

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles