Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
shape: 'swimlane',
align: 'center',
verticalAlign: 'top',
childLayout: 'stackLayout',
horizontal: true,
startSize: 26,
horizontalStack: 0,
resizeParent: true,
resizeParentMax: 0,
resizeLast: 0,
collapsible: 1,
marginBottom: 0,
},
}
const cell = new Cell(
'Classname',
new Geometry(0, 0, data.width, data.height),
data.style,
)
cell.asNode(true)
// cell.insertChild(field.clone())
// cell.insertChild(divider.clone())
return {
data,
render: getRendererForCells([cell]),
}
})
label: '«interface»<br><b>Name</b>',
tags: `${umlTags} interface object instance annotated annotation`,
width: 110,
height: 50,
style: {
shape: 'rectangle',
htmlLabel: true,
},
},
].map(data => ({
data,
render: getRenderer(data),
})),
)
const field = new Cell('+ field: type', new Geometry(0, 0, 100, 20), {
fill: 'none',
stroke: 'none',
align: 'left',
verticalAlign: 'top',
spacingLeft: 4,
spacingRight: 4,
overflow: 'hidden',
rotatable: false,
portAnchor: 'eastwest',
})
field.asNode(true)
const divider = new Cell('', new Geometry(0, 0, 40, 8), {
shape: 'line',
strokeWidth: 1,
fill: 'none',
)
const field = new Cell('+ field: type', new Geometry(0, 0, 100, 20), {
fill: 'none',
stroke: 'none',
align: 'left',
verticalAlign: 'top',
spacingLeft: 4,
spacingRight: 4,
overflow: 'hidden',
rotatable: false,
portAnchor: 'eastwest',
})
field.asNode(true)
const divider = new Cell('', new Geometry(0, 0, 40, 8), {
shape: 'line',
strokeWidth: 1,
fill: 'none',
align: 'left',
verticalAlign: 'middle',
spacingTop: -1,
spacingLeft: 3,
spacingRight: 3,
rotatable: false,
labelPosition: 'right',
portAnchor: 'eastwest',
})
divider.asNode(true)
const createItem = (fn: () => PaletteItem) => {
items.push(fn())