From dd85f23bdb78d53d4b704d18b4a6eceaea8335bd Mon Sep 17 00:00:00 2001 From: capellancitizen Date: Thu, 11 Apr 2024 01:32:32 -0400 Subject: [PATCH] Fixed jumps rendering when toggling on realistic preview with jump rendering disabled. (#2835) Fixes issue #2751 --- electron/src/renderer/assets/js/simulator.js | 21 +++++--------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/electron/src/renderer/assets/js/simulator.js b/electron/src/renderer/assets/js/simulator.js index e751f137c..26ad442e7 100644 --- a/electron/src/renderer/assets/js/simulator.js +++ b/electron/src/renderer/assets/js/simulator.js @@ -95,32 +95,21 @@ export default { } setImmediate(()=> { - for (let i = 1; i < this.stitches.length; i++) { - if (i < this.currentStitch) { - this.realisticPaths[i].show() - } else { - this.realisticPaths[i].hide() - } - } + this.renderedStitch = 0 + this.renderFrame() this.simulation.hide() this.realisticPreview.show() }) } else { - - for (let i = 1; i < this.stitches.length; i++) { - if (i < this.currentStitch) { - this.stitchPaths[i].show() - } else { - this.stitchPaths[i].hide() - } - } + this.renderedStitch = 0 + this.renderFrame() this.simulation.show() this.realisticPreview.hide() - } + if (animating) { this.start() }