[WIP] Height

This commit is contained in:
Carl Fuchs 2023-02-20 15:32:06 +01:00
parent 869cd2a7c4
commit 387e103501
3 changed files with 15 additions and 12 deletions

View file

@ -28,16 +28,13 @@ export function SelectorSymbol(props: ISelectorSymbolProps): JSX.Element {
if (props.selected.isVertical) {
x = -SYMBOL_MARGIN;
y = props.selected.offset;
y = (props.selected.offset + props.selected.height / 2) - height;
} else {
[x,y] = [
props.selected.offset + props.selected.width / 2,
-SYMBOL_MARGIN - height]
[x, y] = [
props.selected.offset + props.selected.width / 2,
-SYMBOL_MARGIN - height];
}
const xText = x + width / 2;
const yText = y + height / 2;
const style: React.CSSProperties = {
transform: 'translateX(-50%)',
transformBox: 'fill-box'

View file

@ -38,7 +38,7 @@ export function Symbol(props: ISymbolProps): JSX.Element {
}
if (props.model.isVertical) {
x = -SYMBOL_MARGIN;
y = props.model.offset + props.model.width / 2;
y = props.model.offset + props.model.height / 2;
} else {
x = props.model.offset + props.model.width / 2;
y = -SYMBOL_MARGIN;