call _updateGraph() as soon as the node info is modified

1123
ZhangGe6 4 years ago
parent 975682eafe
commit d190aebf91

@ -243,7 +243,8 @@ host.BrowserHost = class {
swal("Success!", "Modified model has been successfuly saved in ./modified_onnx/", "success"); swal("Success!", "Modified model has been successfuly saved in ./modified_onnx/", "success");
} }
else { else {
swal("Error happens!", "You are kindly to create an issue on https://github.com/ZhangGe6/onnx-modifier", "error"); // swal("Error happens!", "You are kindly to create an issue on https://github.com/ZhangGe6/onnx-modifier", "error");
swal("Error happens!", "You can check the log or kindly create an issue on https://github.com/ZhangGe6/onnx-modifier", "error");
// alert('Error happens, you can find it out or create an issue on https://github.com/ZhangGe6/onnx-modifier') // alert('Error happens, you can find it out or create an issue on https://github.com/ZhangGe6/onnx-modifier')
} }
}); });

@ -893,6 +893,7 @@ view.View = class {
} }
} }
// console.log(this._graphs[0].nodes)
// console.log(this.lastViewGraph._addedNode) // console.log(this.lastViewGraph._addedNode)
} }
@ -1159,6 +1160,7 @@ view.Graph = class extends grapher.Graph {
this._addedNode.get(modelNodeName).attributes.set(attributeName, targetValue) this._addedNode.get(modelNodeName).attributes.set(attributeName, targetValue)
} }
// console.log(this._addedNode) // console.log(this._addedNode)
this.view._updateGraph()
} }
@ -1171,6 +1173,7 @@ view.Graph = class extends grapher.Graph {
if (this._addedNode.get(modelNodeName).outputs.has(parameterName)) { if (this._addedNode.get(modelNodeName).outputs.has(parameterName)) {
this._addedNode.get(modelNodeName).outputs.get(parameterName)[arg_index] = targetValue this._addedNode.get(modelNodeName).outputs.get(parameterName)[arg_index] = targetValue
} }
this.view._updateGraph() // otherwise the changes can not be updated without manully update graph
} }
// console.log(this._addedNode) // console.log(this._addedNode)
} }

@ -9,7 +9,6 @@
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='view-grapher.css')}}"> <link rel="stylesheet" type="text/css" href="{{url_for('static', filename='view-grapher.css')}}">
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='view-sidebar.css')}}"> <link rel="stylesheet" type="text/css" href="{{url_for('static', filename='view-sidebar.css')}}">
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='sweetalert.css')}}"> <link rel="stylesheet" type="text/css" href="{{url_for('static', filename='sweetalert.css')}}">
<script src="https://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<script src="{{url_for('static', filename='sweetalert.min.js')}}"></script> <script src="{{url_for('static', filename='sweetalert.min.js')}}"></script>
<script src="{{url_for('static', filename='dagre.js')}}"></script> <script src="{{url_for('static', filename='dagre.js')}}"></script>
<script src="{{url_for('static', filename='base.js')}}"></script> <script src="{{url_for('static', filename='base.js')}}"></script>

Loading…
Cancel
Save