Skip to content

Commit f2e85ba

Browse files
authored
Merge pull request #364 from eccenca/bugfix/centeredNodeContentMenuItems-CMEM-7184
bugfix: centered header-menu items in <NodeContent />
2 parents 59fa23a + 6af2e32 commit f2e85ba

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2222
- reduce visual impact of border
2323
- `<StringPreviewContentBlobToggler />`
2424
- take Markdown rendering into account before testing the maximum preview length
25+
- `<NodeContent />`
26+
- header-menu items are vertically centered now
2527

2628
### Changed
2729

src/extensions/react-flow/nodes/_nodes.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
border-radius: $reactflow-node-border-radius;
5454

5555
&:hover {
56-
box-shadow: 0 0 0 6 * $reactflow-node-border-width eccgui-color-rgba($reactflow-edge-stroke-color-selected, 0.05);
56+
box-shadow: 0 0 0 6 * $reactflow-node-border-width
57+
eccgui-color-rgba($reactflow-edge-stroke-color-selected, 0.05);
5758
}
5859

5960
&.was-resized.is-resizable-vertical {
@@ -147,8 +148,10 @@
147148

148149
.#{$eccgui}-graphviz__node__header-depiction,
149150
.#{$eccgui}-graphviz__node__header-menu {
151+
display: flex;
150152
flex-grow: 0;
151153
flex-shrink: 0;
154+
align-items: center;
152155
max-height: calc(#{$reactflow-node-basesize} - #{2 * $reactflow-node-border-width});
153156
margin: 0 $eccgui-size-block-whitespace * 0.25;
154157

@@ -158,8 +161,6 @@
158161
}
159162

160163
.#{$eccgui}-graphviz__node__header-depiction {
161-
display: flex;
162-
align-items: center;
163164
justify-content: center;
164165

165166
/* TODO: does not work correctly with tooltips around

0 commit comments

Comments
 (0)