From ca5104ee213f31bf0ccba185d104656d43b726be Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Sat, 5 Feb 2022 21:50:57 -0500 Subject: [PATCH] Properly support edit on subcircuits --- package-lock.json | 4 ++-- view/main.mjs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c11545e..f1995bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2189,7 +2189,7 @@ }, "node_modules/digitaljs": { "version": "0.11.0", - "resolved": "git+ssh://git@github.com/yuyichao/digitaljs.git#4062532ef98967a84502793d5ac06576539306d3", + "resolved": "git+ssh://git@github.com/yuyichao/digitaljs.git#c866ce053f12f8e3336904ad19c3947560fdd61d", "license": "BSD-2-Clause", "dependencies": { "3vl": "^1.0.0", @@ -10727,7 +10727,7 @@ } }, "digitaljs": { - "version": "git+ssh://git@github.com/yuyichao/digitaljs.git#4062532ef98967a84502793d5ac06576539306d3", + "version": "git+ssh://git@github.com/yuyichao/digitaljs.git#c866ce053f12f8e3336904ad19c3947560fdd61d", "from": "digitaljs@github:yuyichao/digitaljs#dev", "requires": { "3vl": "^1.0.0", diff --git a/view/main.mjs b/view/main.mjs index 5d23af3..d56c4ae 100644 --- a/view/main.mjs +++ b/view/main.mjs @@ -651,11 +651,11 @@ class DigitalJS { // with different layout parameters. // Most likely, we'll need to patch it a bit ourselves but we should do that // in a backward compatible way... - /* for (const cell of graph.getCells()) { - * if (cell.get('type') === 'Subcircuit') { - * reg_graph_listeners(cell.get('graph')); - * } - * } */ + for (const cell of graph.getCells()) { + if (cell.get('type') === 'Subcircuit') { + reg_graph_listeners(cell.get('graph')); + } + } }; reg_graph_listeners(this.circuit._graph); this.circuit.on('postUpdateGates', (tick) => {