diff --git a/README.md b/README.md index b6a547b..4091021 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,12 @@ ## 更新日志 +* 2021年2月1日,前端更新 + + * 发现bug,拖拽元件时,发现连线无法跟着移动 + * 增加了对xml格式文件的电路解析info + * 将电路具体的解析info转换为spice网表电路功能待开发 + * ![avatar](./Schematic/schematic2.png) * 2021年1月31日,前端更新 * 增加了元件属性修改功能,增加了对属性的解析 diff --git a/Schematic/schematic2.png b/Schematic/schematic2.png new file mode 100644 index 0000000..d7f6bbe Binary files /dev/null and b/Schematic/schematic2.png differ diff --git a/Schematic/spice.xml b/Schematic/spice.xml new file mode 100644 index 0000000..6ae0497 --- /dev/null +++ b/Schematic/spice.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Schematic/template/schematic.html b/Schematic/template/schematic.html index 40bf6a5..a8d45b9 100644 --- a/Schematic/template/schematic.html +++ b/Schematic/template/schematic.html @@ -217,23 +217,158 @@ @@ -580,34 +715,57 @@ function showOutline(graph) var node = encoder.encode(graph.getModel()); mxUtils.popup(mxUtils.getPrettyXml(node), true); })); - - document.body.appendChild(mxUtils.button('Create toolbar entry from selection', function() + + + + // Extract SPICE model + document.body.appendChild(mxUtils.button('Show SPICE', function() { - if (!graph.isSelectionEmpty()) - { - // Creates a copy of the selection array to preserve its state - var cells = graph.getSelectionCells(); - var bounds = graph.getView().getBounds(cells); + let content = ''; + var node = ParseSpice(graph.getModel()); + for(var i=0; i