From d854218c9d0db9f6f7eba9035cbbec8334b195dc Mon Sep 17 00:00:00 2001 From: Siklos Date: Thu, 18 Aug 2022 13:05:47 +0200 Subject: [PATCH] Added new defaults settings --- src/Components/SVG/Elements/Container.tsx | 25 +++++++++++++---------- src/utils/default.ts | 16 ++++++++++----- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/Components/SVG/Elements/Container.tsx b/src/Components/SVG/Elements/Container.tsx index b6431fb..b6c42a9 100644 --- a/src/Components/SVG/Elements/Container.tsx +++ b/src/Components/SVG/Elements/Container.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { Interweave, Node } from 'interweave'; import { XPositionReference } from '../../../Enums/XPositionReference'; import { IContainerModel } from '../../../Interfaces/IContainerModel'; -import { DIMENSION_MARGIN } from '../../../utils/default'; +import { DIMENSION_MARGIN, SHOW_CHILDREN_DIMENSIONS, SHOW_PARENT_DIMENSION } from '../../../utils/default'; import { getDepth } from '../../../utils/itertools'; import { Dimension } from './Dimension'; import IProperties from '../../../Interfaces/IProperties'; @@ -54,7 +54,7 @@ export const Container: React.FC = (props: IContainerProps) => const text = (props.model.properties.width ?? 0).toString(); let dimensionChildren: JSX.Element | null = null; - if (props.model.children.length > 1) { + if (props.model.children.length > 1 && SHOW_CHILDREN_DIMENSIONS) { const { childrenId, xChildrenStart, @@ -79,15 +79,18 @@ export const Container: React.FC = (props: IContainerProps) => transform={transform} key={`container-${props.model.properties.id}`} > - + { SHOW_PARENT_DIMENSION + ? + : null + } { dimensionChildren } { svg }