Compare commits

..

No commits in common. "39a47659b62f167b8a82a003abf7fd0ce52be479" and "db0dbeaeab1257f85404639ba7a5f12b30df242e" have entirely different histories.

5 changed files with 7 additions and 21 deletions

View file

@ -1,6 +1,5 @@
import { Dispatch, SetStateAction } from 'react'; import { Dispatch, SetStateAction } from 'react';
import { IHistoryState } from '../../Interfaces/IHistoryState'; import { IHistoryState } from '../../Interfaces/IHistoryState';
import { ENABLE_SHORTCUTS } from '../../utils/default';
export function onKeyDown( export function onKeyDown(
event: KeyboardEvent, event: KeyboardEvent,
@ -8,10 +7,6 @@ export function onKeyDown(
historyCurrentStep: number, historyCurrentStep: number,
setHistoryCurrentStep: Dispatch<SetStateAction<number>> setHistoryCurrentStep: Dispatch<SetStateAction<number>>
): void { ): void {
if (!ENABLE_SHORTCUTS) {
return;
}
event.preventDefault(); event.preventDefault();
if (event.isComposing || event.keyCode === 229) { if (event.isComposing || event.keyCode === 229) {
return; return;

View file

@ -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, SHOW_TEXT } from '../../../utils/default'; import { DIMENSION_MARGIN, SHOW_CHILDREN_DIMENSIONS, SHOW_PARENT_DIMENSION } 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,14 +93,12 @@ export const Container: React.FC<IContainerProps> = (props: IContainerProps) =>
} }
{ dimensionChildren } { dimensionChildren }
{ svg } { svg }
{ SHOW_TEXT <text
? <text x={xText}
x={xText} y={yText}
y={yText} >
> {props.model.properties.id}
{props.model.properties.id} </text>
</text>
: null }
{ containersElements } { containersElements }
</g> </g>
); );

View file

@ -78,7 +78,6 @@ function AddNewDimension(currentDepth: number, min: number, max: number, lastY:
dimensions.push( dimensions.push(
<Dimension <Dimension
key={id}
id={id} id={id}
xStart={xStart} xStart={xStart}
yStart={y} yStart={y}

View file

@ -22,7 +22,6 @@ const getDimensionsNodes = (root: ContainerModel): React.ReactNode[] => {
const text = width.toString(); const text = width.toString();
dimensions.push( dimensions.push(
<Dimension <Dimension
key={id}
id={id} id={id}
xStart={xStart} xStart={xStart}
yStart={y} yStart={y}

View file

@ -4,10 +4,6 @@ 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;
@ -18,7 +14,6 @@ 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 = {