Fix type check + moved width and height to rect property
This commit is contained in:
parent
6ac76f6619
commit
05622c3a64
3 changed files with 8 additions and 5 deletions
|
@ -82,7 +82,7 @@ class App extends React.Component<IAppProps> {
|
|||
} as IAppProps);
|
||||
}
|
||||
|
||||
public OnPropertyChange(key: string, value: string) {
|
||||
public OnPropertyChange(key: string, value: string | number) {
|
||||
if (this.state.SelectedContainer === null ||
|
||||
this.state.SelectedContainer === undefined) {
|
||||
throw new Error('Property was changed before selecting a Container');
|
||||
|
@ -93,7 +93,7 @@ class App extends React.Component<IAppProps> {
|
|||
throw new Error('Property was changed before the main container was added');
|
||||
}
|
||||
|
||||
const pair = {} as Record<string, string>;
|
||||
const pair = {} as Record<string, string | number>;
|
||||
pair[key] = value;
|
||||
const properties = Object.assign(this.state.SelectedContainer.props.properties, pair);
|
||||
const props = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue