From dd2079b975a70f5d80532ed51afcac59018a5a7c Mon Sep 17 00:00:00 2001 From: Siklos Date: Mon, 15 Aug 2022 22:52:09 +0200 Subject: [PATCH] Fix width and height not being numbers --- src/Interfaces/IProperties.ts | 4 +++- test-server/http.js | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Interfaces/IProperties.ts b/src/Interfaces/IProperties.ts index ef2db7e..ad23442 100644 --- a/src/Interfaces/IProperties.ts +++ b/src/Interfaces/IProperties.ts @@ -10,11 +10,13 @@ import { XPositionReference } from '../Enums/XPositionReference'; * @property isRigidBody if true apply rigid body behaviors * @property isAnchor if true apply anchor behaviors */ -export default interface IProperties extends React.CSSProperties { +export default interface IProperties extends Omit { id: string parentId: string | null x: number y: number + width: number + height: number isRigidBody: boolean isAnchor: boolean XPositionReference?: XPositionReference diff --git a/test-server/http.js b/test-server/http.js index 3c54590..e6b7051 100644 --- a/test-server/http.js +++ b/test-server/http.js @@ -55,8 +55,10 @@ const GetSVGLayoutConfiguration = () => { Type: 'Chassis', Width: 500, Style: { - fillOpacity: 0, + fillOpacity: 1, borderWidth: 2, + stroke: 'red', + fill: '#78350F', stroke: 'red' } }, @@ -67,9 +69,10 @@ const GetSVGLayoutConfiguration = () => { Width: 480, Height: 180, Style: { - fillOpacity: 0, + fillOpacity: 1, borderWidth: 2, - stroke: 'green' + stroke: 'green', + fill: 'white' } }, { @@ -89,7 +92,7 @@ const GetSVGLayoutConfiguration = () => { fillOpacity: 0, borderWidth: 2, stroke: '#713f12', - fill: '#713f12' + fill: '#713f12', } } ],