warn if unknown node property is given
This commit is contained in:
parent
9e8c03cb49
commit
b6d3ac8e32
|
@ -324,10 +324,15 @@ const rect = (parent, node) => {
|
|||
.attr('y', -bbox.height / 2 - halfPadding)
|
||||
.attr('width', totalWidth)
|
||||
.attr('height', totalHeight);
|
||||
// TODO warn if unknown property is given
|
||||
|
||||
const propKeys = new Set(Object.keys(node.props));
|
||||
if (node.props?.borders) {
|
||||
applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);
|
||||
propKeys.delete('borders');
|
||||
}
|
||||
propKeys.forEach((propKey) => {
|
||||
log.warn(`Unknown node property ${propKey}`);
|
||||
});
|
||||
|
||||
updateNodeBounds(node, rect);
|
||||
|
||||
|
|
Loading…
Reference in New Issue