We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b29d05 + d0c44e9 commit 004261dCopy full SHA for 004261d
src/Graph.js
@@ -49,6 +49,7 @@ class Graph extends React.Component {
49
this.pendingUpdate = false;
50
this.rendering = false;
51
this.prevFit = null;
52
+ this.prevDotSrc = '';
53
}
54
55
componentDidMount() {
@@ -90,6 +91,9 @@ class Graph extends React.Component {
90
91
if (this.props.dotSrc.length === 0) {
92
return;
93
94
+ if (this.props.dotSrc === this.prevDotSrc) {
95
+ return;
96
+ }
97
if (this.rendering) {
98
this.pendingUpdate = true;
99
@@ -106,6 +110,7 @@ class Graph extends React.Component {
106
110
107
111
this.prevFit = this.props.fit;
108
112
113
+ this.prevDotSrc = this.props.dotSrc;
109
114
this.rendering = true;
115
this.graphviz
116
.width(width)
0 commit comments