Skip to content

Commit

Permalink
perf: fix hang when leaving G-Code Preview page
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanregner committed Jul 17, 2024
1 parent 021cb61 commit 01fccb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/gcodeviewer/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { getDefaultState } from './index'
import { MutationTree } from 'vuex'
import { GcodeviewerState } from '@/store/gcodeviewer/types'
import Vue from 'vue'
import Vue, { markRaw } from 'vue'

export const mutations: MutationTree<GcodeviewerState> = {
reset(state) {
Object.assign(state, getDefaultState())
},

setViewerBackup(state, backup) {
Vue.set(state, 'viewerBackup', backup)
Vue.set(state, 'viewerBackup', markRaw(backup) /* viewer object is large and quite slow to proxy */)
},

setCanvasBackup(state, backup) {
Expand Down

0 comments on commit 01fccb7

Please sign in to comment.