WIP
This commit is contained in:
parent
579422653b
commit
79caa5e9ab
8 changed files with 35 additions and 25 deletions
|
@ -169,7 +169,7 @@ function AddHorizontalSymbolDimension(symbol: ISymbolModel,
|
|||
color: string,
|
||||
depth: number
|
||||
): void {
|
||||
const width = symbol.x + (symbol.width / 2);
|
||||
const width = symbol.offset + (symbol.width / 2);
|
||||
if (width != null && width > 0) {
|
||||
const id = `dim-y-margin-left${symbol.width.toFixed(0)}-${symbol.id}`;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ export function SelectorSymbol(props: ISelectorSymbolProps): JSX.Element {
|
|||
props.selected.height / scale
|
||||
];
|
||||
|
||||
const [x, y] = [props.selected.x, -SYMBOL_MARGIN - height];
|
||||
const [x, y] = [props.selected.offset, -SYMBOL_MARGIN - height];
|
||||
|
||||
const xText = x + width / 2;
|
||||
const yText = y + height / 2;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Interweave } from 'interweave';
|
||||
import * as React from 'react';
|
||||
import { ISymbolModel } from '../../../Interfaces/ISymbolModel';
|
||||
import { type ISymbolModel } from '../../../Interfaces/ISymbolModel';
|
||||
import { DIMENSION_MARGIN, SYMBOL_MARGIN } from '../../../utils/default';
|
||||
|
||||
interface ISymbolProps {
|
||||
|
@ -12,10 +12,11 @@ export function Symbol(props: ISymbolProps): JSX.Element {
|
|||
const href = props.model.config.Image.Base64Image ?? props.model.config.Image.Url;
|
||||
const hasSVG = props.model.config.Image.Svg !== undefined &&
|
||||
props.model.config.Image.Svg !== null;
|
||||
|
||||
if (hasSVG) {
|
||||
return (
|
||||
<g
|
||||
x={props.model.x}
|
||||
x={props.model.offset}
|
||||
y={-DIMENSION_MARGIN / props.scale}
|
||||
>
|
||||
<Interweave
|
||||
|
@ -36,7 +37,7 @@ export function Symbol(props: ISymbolProps): JSX.Element {
|
|||
transform: 'translateY(-100%) translateX(-50%)',
|
||||
transformBox: 'fill-box'
|
||||
}}
|
||||
x={props.model.x + props.model.width / 2}
|
||||
x={props.model.offset + props.model.width / 2}
|
||||
y={-SYMBOL_MARGIN}
|
||||
height={props.model.height / props.scale}
|
||||
width={props.model.width / props.scale} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue