Fix type check + moved width and height to rect property

This commit is contained in:
Siklos 2022-08-01 19:42:28 +02:00
parent 6ac76f6619
commit 05622c3a64
3 changed files with 8 additions and 5 deletions

View file

@ -31,6 +31,8 @@ export class Container extends React.Component<IContainerProps> {
const style = Object.assign(defaultStyle, this.props.properties);
style.x = 0;
style.y = 0;
delete style.height;
delete style.width;
return (
<g
@ -39,6 +41,8 @@ export class Container extends React.Component<IContainerProps> {
key={`container-${this.props.properties.id}`}
>
<rect
width={this.props.properties.width}
height={this.props.properties.height}
style={style}
>
</rect>