       new go.Shape({fill: 'transparent', strokeWidth: 0}),
          new go.Panel(new PanelLayoutFlow({
              spacing: new go.Size(5, 5),
              direction: 0
            }), {
            name: name,
            maxSize: new go.Size(150, 150),
            visible: !!selected
          })
          .add(
            ...figures.map(makeShape)
          )
        );
    }

    function makeShape(fig) {
      return new go.Shape(fig, {
        width: 20,
        height: 20,
        fill: 'white'