Skip to content

Commit

Permalink
perf: fix hang when leaving G-Code Preview page (#1949)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanregner authored Jul 17, 2024
1 parent 418ad4a commit bf555c1
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 bf555c1

Please sign in to comment.