diff options
| author | capellancitizen <thecapellancitizen@gmail.com> | 2024-04-11 01:32:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-11 07:32:32 +0200 |
| commit | dd85f23bdb78d53d4b704d18b4a6eceaea8335bd (patch) | |
| tree | c55ffc12b5f1dd585609aca7c1372c75d923ce89 /electron/src/renderer | |
| parent | 8fe9f7506e2ae1bea23ac86b75bd4f6d47c5dcb2 (diff) | |
Fixed jumps rendering when toggling on realistic preview with jump rendering disabled. (#2835)
Fixes issue #2751
Diffstat (limited to 'electron/src/renderer')
| -rw-r--r-- | electron/src/renderer/assets/js/simulator.js | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/electron/src/renderer/assets/js/simulator.js b/electron/src/renderer/assets/js/simulator.js index e751f137..26ad442e 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() } |
