Merge pull request #3183 from mabashian/3018-wf-save

Cancel node form when user deletes node being edited

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-02-07 20:59:45 +00:00 committed by GitHub
commit 1fbcd1b10b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -839,6 +839,10 @@ export default ['$scope', 'TemplatesService',
$scope.cancelLinkForm();
}
if ($scope.nodeConfig && $scope.nodeConfig.nodeId === nodeId) {
$scope.cancelNodeForm();
}
// Remove the node from the array
for( let i = $scope.graphState.arrayOfNodesForChart.length; i--; ){
if ($scope.graphState.arrayOfNodesForChart[i].id === nodeId) {