Javascript JointJS,rappid使用已定义的形状创建自定义形状

Javascript JointJS,rappid使用已定义的形状创建自定义形状,javascript,jointjs,rappid,Javascript,Jointjs,Rappid,有没有办法用已定义的形状制作自定义形状? 我想用已经定义的单元格形状创建新的单元格形状 例如…(它不是工作代码,我想要这样) 在这个示例代码中,自定义元素的类型(usercustom.Images)有两个已经定义的类型形状(standard.Image) 标准。图像类型已存在。我想在两个(或三个,四个…)周围做一个外壳 你有什么好主意吗 先谢谢你 { type: 'usercustom.Images', size: { width: 53, height: 42 }, a

有没有办法用已定义的形状制作自定义形状? 我想用已经定义的单元格形状创建新的单元格形状

例如…(它不是工作代码,我想要这样)

在这个示例代码中,自定义元素的类型(usercustom.Images)有两个已经定义的类型形状(standard.Image)

标准。图像类型已存在。我想在两个(或三个,四个…)周围做一个外壳

你有什么好主意吗

先谢谢你

{
    type: 'usercustom.Images',
    size: { width: 53, height: 42 },
    attrs: [
        {
            type: 'standard.Image',
            size: { width: 53, height: 42 },
            attrs: {
                root: {
                    dataTooltip: 'Image1',
                    dataTooltipPosition: 'left',
                    dataTooltipPositionSelector: '.joint-stencil'
                },
                image: {
                    xlinkHref: '/assets/imageIcons/Image1.png'
                },
                body: {
                    fill: 'transparent',
                    stroke: '#31d0c6',
                    strokeWidth: 2,
                    strokeDasharray: '0'
                },
                label: {
                    text: 'Image1',
                    fontFamily: 'Roboto Condensed',
                    fontWeight: 'Normal',
                    fontSize: 11,
                    fill: '#c6c7e2'
                }
            }
        },
        {
            type: 'standard.Image',
            size: { width: 53, height: 42 },
            attrs: {
                root: {
                    dataTooltip: 'Image2',
                    dataTooltipPosition: 'left',
                    dataTooltipPositionSelector: '.joint-stencil'
                },
                image: {
                    xlinkHref: '/assets/imageIcons/Image2.png'
                },
                body: {
                    fill: 'transparent',
                    stroke: '#31d0c6',
                    strokeWidth: 2,
                    strokeDasharray: '0'
                },
                label: {
                    text: 'Image2',
                    fontFamily: 'Roboto Condensed',
                    fontWeight: 'Normal',
                    fontSize: 11,
                    fill: '#c6c7e2'
                }
            }
        }
    ],
    markup: [{
        tagName: 'g',
        children: [{
            tagName: 'image',
            selector: 'image'
        },{
            tagName: 'image',
            selector: 'image2'
        }]
    }, {
        tagName: 'text',
        selector: 'label'
    }]
}