mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Fix sizing / positioning error for trace graph node with subsequent branches (#10049)
This commit is contained in:
parent
0c940be5fb
commit
7fc00ce1cb
@ -40,6 +40,8 @@ export class HatGraphNode extends LitElement {
|
|||||||
const width = SPACING + NODE_SIZE;
|
const width = SPACING + NODE_SIZE;
|
||||||
return html`
|
return html`
|
||||||
<svg
|
<svg
|
||||||
|
width="${width}px"
|
||||||
|
height="${height}px"
|
||||||
viewBox="-${Math.ceil(width / 2)} -${this.graphStart
|
viewBox="-${Math.ceil(width / 2)} -${this.graphStart
|
||||||
? Math.ceil(height / 2)
|
? Math.ceil(height / 2)
|
||||||
: Math.ceil((NODE_SIZE + SPACING * 2) / 2)} ${width} ${height}"
|
: Math.ceil((NODE_SIZE + SPACING * 2) / 2)} ${width} ${height}"
|
||||||
@ -89,7 +91,7 @@ export class HatGraphNode extends LitElement {
|
|||||||
:host {
|
:host {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
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(
|
height: calc(
|
||||||
var(--hat-graph-node-size) + var(--hat-graph-spacing) + 1px
|
var(--hat-graph-node-size) + var(--hat-graph-spacing) + 1px
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user