How to hide nodes?

I can not hide the nodes that have received no variables. Thank you. Jury.


Yes, you could add one or more properties to the node data. Maybe something like:

  . . .
  { key: NameNode_2_level_id_6, visible: false },
  . . .

Then in your node template you could do something like:

  $(go.Node,
      . . .,
      new go.Binding("visible", "visible"),
      new go.Binding("isTreeExpanded", "visible"),
      . . .
  )

I suggest having the binding of Node.isTreeExpanded because I assume your graph structure is a tree.

Hi! Yes, visible: false only works in manual mode. But the appearance of register in function to the visibility for the site began after receiving variable from php?

I’m not sure what you are wanting to do that isn’t already covered by my previous response.

I highly recommend reading Get Started with GoJS and the first few pages of GoJS Introduction -- Northwoods Software, especially these pages, in the order:

  1. GoJS Introduction -- Northwoods Software
  2. GoJS Building GraphObjects -- Northwoods Software
  3. GoJS Panels -- Northwoods Software
  4. GoJS Using Models -- Northwoods Software
  5. GoJS Data Binding -- Northwoods Software