diff --git a/src/App.scss b/src/App.scss index c41aeab..ac9c791 100644 --- a/src/App.scss +++ b/src/App.scss @@ -4,16 +4,4 @@ body, svg { height: 100%; width: 100%; -} - -text { - font-size: 18px; - font-weight: 800; - fill: none; - fill-opacity: 0; - stroke: #000000; - stroke-width: 1px; - stroke-linecap: butt; - stroke-linejoin: miter; - stroke-opacity: 1; } \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index a9066fb..da989ac 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -218,7 +218,7 @@ class App extends React.Component { onClick={() => this.ToggleSidebar()} buttonOnClick={(type: string) => this.AddContainer(type)} /> - + { onPropertyChange={(key: string, value: string) => this.OnPropertyChange(key, value)} selectContainer={(container: Container) => this.SelectContainer(container)} /> - + { this.state.MainContainer } @@ -243,8 +243,6 @@ class App extends React.Component { export async function fetchConfiguration(): Promise { const url = `${import.meta.env.VITE_API_URL}`; - // The test library cannot use the Fetch API - // @ts-ignore if (window.fetch) { return await fetch(url, { method: 'POST' diff --git a/src/Components/SVG/Elements/Container.tsx b/src/Components/SVG/Elements/Container.tsx index d5671e2..907b4af 100644 --- a/src/Components/SVG/Elements/Container.tsx +++ b/src/Components/SVG/Elements/Container.tsx @@ -57,17 +57,12 @@ export class Container extends React.Component { public render(): React.ReactNode { const containersElements = this.props.children.map(child => child.render()); - const xText = (this.props.properties.x * 2 + Number(this.props.properties.width)) / 2; - const yText = (this.props.properties.y * 2 + Number(this.props.properties.height)) / 2; - - // g style const defaultStyle = { transitionProperty: 'all', transitionTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)', transitionDuration: '150ms' } as React.CSSProperties; - // Rect style const style = Object.assign( JSON.parse(JSON.stringify(defaultStyle)), this.props.properties @@ -77,7 +72,6 @@ export class Container extends React.Component { delete style.height; delete style.width; - // Dimension props const id = `dim-${this.props.properties.id}`; const xStart: number = 0; const xEnd = Number(this.props.properties.width); @@ -105,12 +99,6 @@ export class Container extends React.Component { style={style} > - - {this.props.properties.id} - { containersElements } ); diff --git a/src/index.scss b/src/index.css similarity index 100% rename from src/index.scss rename to src/index.css diff --git a/src/main.tsx b/src/main.tsx index 95b3daf..a2bf01b 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; -import './index.scss'; +import './index.css'; ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(