Fix sizing / positioning error for trace graph node with subsequent branches (#10049)

This commit is contained in:
Philip Allgaier 2021-10-14 17:00:31 +02:00 committed by GitHub
parent 0c940be5fb
commit 7fc00ce1cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,8 @@ export class HatGraphNode extends LitElement {
const width = SPACING + NODE_SIZE;
return html`
<svg
width="${width}px"
height="${height}px"
viewBox="-${Math.ceil(width / 2)} -${this.graphStart
? Math.ceil(height / 2)
: Math.ceil((NODE_SIZE + SPACING * 2) / 2)} ${width} ${height}"
@ -89,7 +91,7 @@ export class HatGraphNode extends LitElement {
:host {
display: flex;
flex-direction: column;
width: calc(var(--hat-graph-node-size) + var(--hat-graph-spacing));
min-width: calc(var(--hat-graph-node-size) + var(--hat-graph-spacing));
height: calc(
var(--hat-graph-node-size) + var(--hat-graph-spacing) + 1px
);