File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " reactjs-graphs" ,
3- "version" : " 1.0.3 " ,
3+ "version" : " 1.0.4 " ,
44 "description" : " Create branched graphs in ReactJS" ,
55 "main" : " build/index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default class Graph extends React.Component {
2525 let mainIndex = 1
2626
2727 let totalYAllowed = props . height
28- let vertexGap = props . orientation === 'horizontal' ? 100 : 70
28+ let vertexGap = props . vertexGap
2929
3030 let horizontalMin = 0 , horizontalMax = 0
3131 let verticalMin = props . height / 2 , verticalMax = props . height / 2
@@ -185,9 +185,11 @@ export default class Graph extends React.Component {
185185Graph . propTypes = {
186186 orientation : PropTypes . oneOf ( [ 'horizontal' , 'vertical' ] ) . isRequired ,
187187 width : PropTypes . number . isRequired ,
188- height : PropTypes . number . isRequired
188+ height : PropTypes . number . isRequired ,
189+ vertexGap : PropTypes . number . isRequired
189190}
190191
191192Graph . defaultProps = {
192- orientation : 'horizontal'
193+ orientation : 'horizontal' ,
194+ vertexGap : 100
193195}
You can’t perform that action at this time.
0 commit comments