,
        margin: 5,
        background: 'transparent', // to catch a click anywhere in bounds
        strokeWidth: 2,
        stroke: 'black',
        click: (e, shape) => {
          var ad = shape.part;
          e.diagram.commit((diag) => {
            diag.model.set(ad.data, 'figure', fig);
            ad.adornedPart.invalidateConnectedLinks();
          }, 'modified figure');
        },
        mouseEnter: (e, obj) => {
          obj.fill = 'gray';
        },
        mouseLeave: (e, obj) => {
        