diff options
author | xuegao <xg353y@intl.att.com> | 2019-08-16 11:07:24 +0200 |
---|---|---|
committer | xuegao <xg353y@intl.att.com> | 2019-08-19 15:27:50 +0200 |
commit | 691e2b7a8bb16d224a0fbe30390152ea309e88e2 (patch) | |
tree | 89ad60de80038e22606fb8d34d1d2c3a102d02ee /ui-react/src/components/loop_viewer | |
parent | 6da0e17bd212ff5414a9798a2a2c3941b365d930 (diff) |
Rework deploy action and close model
Rework the deploy action and the close model feature.
Issue-ID: CLAMP-445, CLAMP-451
Change-Id: Ic122a584b676d50b9bddcac6e5553266b2281a01
Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/components/loop_viewer')
-rw-r--r-- | ui-react/src/components/loop_viewer/svg/LoopSvg.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ui-react/src/components/loop_viewer/svg/LoopSvg.js b/ui-react/src/components/loop_viewer/svg/LoopSvg.js index 3ac2f31f..1b1e2428 100644 --- a/ui-react/src/components/loop_viewer/svg/LoopSvg.js +++ b/ui-react/src/components/loop_viewer/svg/LoopSvg.js @@ -61,13 +61,14 @@ class LoopViewSvg extends React.Component { return this.state.svgContent !== nextState.svgContent; } - componentWillReceiveProps(newProps) { - this.setState({ - loopCache: newProps.loopCache, - componentModalMapping: LoopComponentConverter.buildMapOfComponents(newProps.loopCache), - - }); - this.getSvg(newProps.loopCache.getLoopName()); + componentWillReceiveProps(newProps) { + if (this.state.loopCache !== newProps.loopCache) { + this.setState({ + loopCache: newProps.loopCache, + componentModalMapping: LoopComponentConverter.buildMapOfComponents(newProps.loopCache), + }); + this.getSvg(newProps.loopCache.getLoopName()); + } } getSvg(loopName) { @@ -79,6 +80,8 @@ class LoopViewSvg extends React.Component { this.setState({ svgContent: LoopViewSvg.emptySvg }) } }); + } else { + this.setState({ svgContent: LoopViewSvg.emptySvg }) } } |