Add option to hide text
This commit is contained in:
parent
b4380570a2
commit
2a86c82997
2 changed files with 14 additions and 7 deletions
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
||||||
import { Interweave, Node } from 'interweave';
|
import { Interweave, Node } from 'interweave';
|
||||||
import { XPositionReference } from '../../../Enums/XPositionReference';
|
import { XPositionReference } from '../../../Enums/XPositionReference';
|
||||||
import { IContainerModel } from '../../../Interfaces/IContainerModel';
|
import { IContainerModel } from '../../../Interfaces/IContainerModel';
|
||||||
import { DIMENSION_MARGIN, SHOW_CHILDREN_DIMENSIONS, SHOW_PARENT_DIMENSION } from '../../../utils/default';
|
import { DIMENSION_MARGIN, SHOW_CHILDREN_DIMENSIONS, SHOW_PARENT_DIMENSION, SHOW_TEXT } from '../../../utils/default';
|
||||||
import { getDepth } from '../../../utils/itertools';
|
import { getDepth } from '../../../utils/itertools';
|
||||||
import { Dimension } from './Dimension';
|
import { Dimension } from './Dimension';
|
||||||
import IProperties from '../../../Interfaces/IProperties';
|
import IProperties from '../../../Interfaces/IProperties';
|
||||||
|
@ -93,12 +93,14 @@ export const Container: React.FC<IContainerProps> = (props: IContainerProps) =>
|
||||||
}
|
}
|
||||||
{ dimensionChildren }
|
{ dimensionChildren }
|
||||||
{ svg }
|
{ svg }
|
||||||
<text
|
{ SHOW_TEXT
|
||||||
x={xText}
|
? <text
|
||||||
y={yText}
|
x={xText}
|
||||||
>
|
y={yText}
|
||||||
{props.model.properties.id}
|
>
|
||||||
</text>
|
{props.model.properties.id}
|
||||||
|
</text>
|
||||||
|
: null }
|
||||||
{ containersElements }
|
{ containersElements }
|
||||||
</g>
|
</g>
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,6 +4,10 @@ import { IConfiguration } from '../Interfaces/IConfiguration';
|
||||||
import { IContainerModel } from '../Interfaces/IContainerModel';
|
import { IContainerModel } from '../Interfaces/IContainerModel';
|
||||||
import IProperties from '../Interfaces/IProperties';
|
import IProperties from '../Interfaces/IProperties';
|
||||||
|
|
||||||
|
/// CONTAINRE DEFAULTS ///
|
||||||
|
|
||||||
|
export const SHOW_TEXT = true;
|
||||||
|
|
||||||
/// DIMENSIONS DEFAULTS ///
|
/// DIMENSIONS DEFAULTS ///
|
||||||
|
|
||||||
export const SHOW_PARENT_DIMENSION = true;
|
export const SHOW_PARENT_DIMENSION = true;
|
||||||
|
@ -14,6 +18,7 @@ export const NOTCHES_LENGTH = 4;
|
||||||
|
|
||||||
/// EDITOR DEFAULTS ///
|
/// EDITOR DEFAULTS ///
|
||||||
|
|
||||||
|
export const ENABLE_SHORTCUTS = true;
|
||||||
export const MAX_HISTORY = 200;
|
export const MAX_HISTORY = 200;
|
||||||
|
|
||||||
export const DEFAULT_CONFIG: IConfiguration = {
|
export const DEFAULT_CONFIG: IConfiguration = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue