ible: false});
                }
              }
              //make the new panel visible
              obj.part.findObject(name)?.set({visible: true});
              obj.part.lastPanelName = name;
            }
          }),
          new go.TextBlock(name, {
            margin: 6,
            stroke: selected ? 'red' : 'black',
            name: textName
          })
        );
    }

    function makeFlowPanel(name, figures, selected) {
      return new go.Panel('Auto', {padding: 10})
        .add(
   