Skip to content

Commit 3d938d1

Browse files
authored
support configurable line height properties on nodes (#24)
1 parent f5ae073 commit 3d938d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export var DEFAULT_CONFIG = {
4444
iconColor: '#F60',
4545
baseHeight: 28,
4646
baseWidth: 226,
47-
textAlignMiddle: false
47+
textAlignMiddle: false,
48+
lineHeight: 12
4849

4950
},
5051
edge: {

src/graph-view-node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ class GraphViewNode {
103103
fontWeight: 600,
104104
width: rectSize.x,
105105
height: rectHeight,
106-
lineSpacing: 50
106+
lineSpacing: 50,
107+
lineHeight: this.getSchemaValue('lineHeight')
107108
},
108109
marker: nodeData.marker ? {
109110
refX: rectSize.x - 20,

0 commit comments

Comments
 (0)