Group not displayed, property visible set to true

I ran into a peculiar issue… I do have a lot of work in my projects with groups and at times I change their visibility - this is done by iterating over all of the nodes using an each method. The logic is placed inside the transaction.

     set visibility

On an unrelated piece of code, I call:

model.setDataProperty(, 'property_name', new_object)

However, whenever I call it, the group becomes invisible, while its property ‘visible’ remains true… I’ve just console logged the output using:

diagram.nodes.each(function (node) {

     console.log(, node.visible)

What am I doing wrong?

Just because a Part might be Part.visible does not mean that Part.isVisible() will return true.

Read about the issue at Part | GoJS API

tnx for the reply walter. I’ve tried console logging the result of the isVisible method as suggested… it returns true, although the group is not visible. I’m also not sure why the line of code I mentioned in the first post would cause a group to disappear.

If a Part.isVisible(), perhaps you cannot see it because:

  • it has no real Part.location, or
  • it is outside the viewport , or
  • it is very tiny (either a very small GraphObject.actualBounds or the diagram is zoomed out), or
  • it is completely transparent or very translucent, or
  • it is hidden behind other Parts.