diff options
author | 2020-07-08 14:33:45 +0000 | |
---|---|---|
committer | 2020-07-08 14:33:45 +0000 | |
commit | fa30aec1d332573f26ad5cd8324a1946273ac58d (patch) | |
tree | e8349b3e39cd754ee2da46fb88749eff580f21fa /ui-react/src/components/loop_viewer | |
parent | c29567afad53e62908abcffcfcc5e6b221102925 (diff) | |
parent | 4fb32395392c3c65ad8dcadc42d7804d2e656c63 (diff) |
Merge "add framework for blocking user interaction"
Diffstat (limited to 'ui-react/src/components/loop_viewer')
-rw-r--r-- | ui-react/src/components/loop_viewer/svg/SvgGenerator.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ui-react/src/components/loop_viewer/svg/SvgGenerator.js b/ui-react/src/components/loop_viewer/svg/SvgGenerator.js index d718c2e4..7070455e 100644 --- a/ui-react/src/components/loop_viewer/svg/SvgGenerator.js +++ b/ui-react/src/components/loop_viewer/svg/SvgGenerator.js @@ -70,13 +70,15 @@ class SvgGenerator extends React.Component { } handleSvgClick(event) { - if (this.state.clickable) { - console.debug("svg click event received"); - var elementName = event.target.parentNode.getAttribute('policyId'); - console.info("SVG element clicked", elementName); - if (elementName !== null) { - this.props.history.push("/policyModal/"+event.target.parentNode.getAttribute('policyType')+"/"+elementName); - } + console.debug("svg click event received"); + if (this.state.clickable) { + var elementName = event.target.parentNode.getAttribute('policyId'); + console.info("SVG element clicked", elementName); + // Only allow movement to policy editing IF there busyLoadingCOunt is 0, + // meaning we are not waiting for refreshStatus to complete, for example + if (elementName !== null && !this.props.isBusyLoading()) { + this.props.history.push("/policyModal/"+event.target.parentNode.getAttribute('policyType')+"/"+elementName); + } } } |