Precent unecessary client app builder store updates to improve performance
This commit is contained in:
parent
e5f49c87f6
commit
3acdf56679
|
@ -80,9 +80,15 @@ const createBuilderStore = () => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setDragging: dragging => {
|
setDragging: dragging => {
|
||||||
|
if (dragging === get(writableStore).isDragging) {
|
||||||
|
return
|
||||||
|
}
|
||||||
writableStore.update(state => ({ ...state, isDragging: dragging }))
|
writableStore.update(state => ({ ...state, isDragging: dragging }))
|
||||||
},
|
},
|
||||||
setEditMode: enabled => {
|
setEditMode: enabled => {
|
||||||
|
if (enabled === get(writableStore).editMode) {
|
||||||
|
return
|
||||||
|
}
|
||||||
writableStore.update(state => ({ ...state, editMode: enabled }))
|
writableStore.update(state => ({ ...state, editMode: enabled }))
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue