summaryrefslogtreecommitdiff
path: root/electron/src
diff options
context:
space:
mode:
authorcapellancitizen <thecapellancitizen@gmail.com>2024-04-11 01:32:32 -0400
committerGitHub <noreply@github.com>2024-04-11 07:32:32 +0200
commitdd85f23bdb78d53d4b704d18b4a6eceaea8335bd (patch)
treec55ffc12b5f1dd585609aca7c1372c75d923ce89 /electron/src
parent8fe9f7506e2ae1bea23ac86b75bd4f6d47c5dcb2 (diff)
Fixed jumps rendering when toggling on realistic preview with jump rendering disabled. (#2835)
Fixes issue #2751
Diffstat (limited to 'electron/src')
-rw-r--r--electron/src/renderer/assets/js/simulator.js21
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()
}