lint fixes
This commit is contained in:
parent
18f588dc99
commit
3676c7af07
6 changed files with 13 additions and 12 deletions
|
@ -56,9 +56,6 @@ const Stack = (props) => {
|
|||
|
||||
const stackLayout = layout.stacks?.[stackName]
|
||||
|
||||
// // Don't just assume this makes sense
|
||||
if (typeof stackLayout?.move?.x === 'undefined') return null
|
||||
|
||||
// Use a ref for direct DOM manipulation
|
||||
const stackRef = useRef(null)
|
||||
const centerRef = useRef(null)
|
||||
|
@ -82,6 +79,9 @@ const Stack = (props) => {
|
|||
handleDrag(select(stackRef.current))
|
||||
}, [rotate, stackRef, stackLayout])
|
||||
|
||||
// // Don't just assume this makes sense
|
||||
if (typeof stackLayout?.move?.x === 'undefined') return null
|
||||
|
||||
// These are kept as vars because re-rendering on drag would kill performance
|
||||
// Managing the difference between re-render and direct DOM updates makes this
|
||||
// whole thing a bit tricky to wrap your head around
|
||||
|
@ -144,7 +144,7 @@ const Stack = (props) => {
|
|||
didDrag = true
|
||||
setTransforms()
|
||||
})
|
||||
.on('end', function (event) {
|
||||
.on('end', function () {
|
||||
// save to gist if anything actually changed
|
||||
if (didDrag) updateLayout()
|
||||
|
||||
|
@ -152,7 +152,7 @@ const Stack = (props) => {
|
|||
})
|
||||
|
||||
/** reset the part's transforms */
|
||||
const resetPart = (event) => {
|
||||
const resetPart = () => {
|
||||
rotation = 0
|
||||
flipX = 0
|
||||
flipY = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue