[Fix] SymbolDimension (Canvas/Svg) => DEFAULT_DIMENSION_SYMBOL_STYLE in default.ts
This commit is contained in:
parent
6b6175a521
commit
869cd2a7c4
3 changed files with 11 additions and 14 deletions
|
@ -2,6 +2,7 @@ import * as React from 'react';
|
|||
import { Orientation } from '../../../Enums/Orientation';
|
||||
import { Position } from '../../../Enums/Position';
|
||||
import {
|
||||
DEFAULT_DIMENSION_SYMBOL_STYLE,
|
||||
DIMENSION_MARGIN,
|
||||
SHOW_BORROWER_DIMENSIONS,
|
||||
SHOW_CHILDREN_DIMENSIONS,
|
||||
|
@ -10,7 +11,7 @@ import {
|
|||
} from '../../../utils/default';
|
||||
import { FindContainerById, MakeRecursionDFSIterator, Pairwise } from '../../../utils/itertools';
|
||||
import { TransformX, TransformY } from '../../../utils/svg';
|
||||
import { Dimension, type IDimensionStyle } from './Dimension';
|
||||
import { Dimension } from './Dimension';
|
||||
import { type IContainerModel } from '../../../Interfaces/IContainerModel';
|
||||
import { type ISymbolModel } from '../../../Interfaces/ISymbolModel';
|
||||
|
||||
|
@ -182,7 +183,6 @@ function AddHorizontalSymbolDimension(symbol: ISymbolModel,
|
|||
const width = symbol.offset + (symbol.width / 2);
|
||||
if (width != null && width > 0) {
|
||||
const id = `dim-y-margin-left${symbol.width.toFixed(0)}-${symbol.id}`;
|
||||
const style = symbol.linkedContainers.values().next().value.dimensionOptions;
|
||||
|
||||
const offset = (DIMENSION_MARGIN * (depth + 1)) / scale;
|
||||
const text = width
|
||||
|
@ -198,7 +198,7 @@ function AddHorizontalSymbolDimension(symbol: ISymbolModel,
|
|||
yEnd={-offset}
|
||||
text={text}
|
||||
scale={scale}
|
||||
style={style}/>
|
||||
style={DEFAULT_DIMENSION_SYMBOL_STYLE}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,6 @@ function AddVerticalSymbolDimension(symbol: ISymbolModel,
|
|||
const height = symbol.offset + (symbol.height / 2);
|
||||
if (height != null && height > 0) {
|
||||
const id = `dim-x-margin-left${symbol.height.toFixed(0)}-${symbol.id}`;
|
||||
const style = symbol.linkedContainers.values().next().value.dimensionOptions;
|
||||
|
||||
const offset = (DIMENSION_MARGIN * (depth + 1)) / scale;
|
||||
const text = height
|
||||
|
@ -228,7 +227,7 @@ function AddVerticalSymbolDimension(symbol: ISymbolModel,
|
|||
yEnd={0}
|
||||
text={text}
|
||||
scale={scale}
|
||||
style={style}/>
|
||||
style={DEFAULT_DIMENSION_SYMBOL_STYLE}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue