sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.23k stars 621 forks source link

simulator breaks when i add an extra coil to custom transformer #875

Open Qwerty135246 opened 1 year ago

Qwerty135246 commented 1 year ago

whenever I add an extra coil to a custom transformer the simulator breaks and I have to save then reload the webpage.

pfalstad commented 1 year ago

Could you give me more detail? What are you setting the description to? How does the simulator break?

Qwerty135246 commented 1 year ago

I'm changing the description from, say, 1:2,3 to 1:2,4,1. the graphics breaks (freezes) and I have to reload the page to fix the graphics. This usually happens for larger circuits or when the transformer is already connected.

pfalstad commented 1 year ago

Can you give me a sample circuit? Or could you see if there's any errors in the browser console?

Qwerty135246 commented 1 year ago

an example is https://tinyurl.com/2a435t7g try adding a coil to a transformer There is also an error in the console: Uncaught TypeError: Cannot read properties of undefined (reading '0') at d9.e9 [as lf] (circuitjs1-0.js:2578:19585) at d9.KU [as _f] (circuitjs1-0.js:2576:24385) at c2 (circuitjs1-0.js:2487:437) at H0 (circuitjs1-0.js:2475:146) at v3 (circuitjs1-0.js:2567:188) at i4.j4 [as Od] (circuitjs1-0.js:2578:1035) at i4.Eb [as Nd] (circuitjs1-0.js:2575:15079) at eval (circuitjs1-0.js:931:42) at Zg (circuitjs1-0.js:830:29) at ah (circuitjs1-0.js:1300:44) at eval (circuitjs1-0.js:1375:46)

pfalstad commented 1 year ago

thanks, will fix.