Fix zoom to not jump anymore (#272)
* Remove scroll handling, honor zoom on drag + ctrl * Add back ability to zoom with mouse wheel, but properly * Add TODO for 'any' removal * Update kittycad lib to remove 'any'
This commit is contained in:
@ -380,8 +380,11 @@ export function App() {
|
||||
clientX,
|
||||
clientY,
|
||||
ctrlKey,
|
||||
shiftKey,
|
||||
currentTarget,
|
||||
nativeEvent,
|
||||
}) => {
|
||||
nativeEvent.preventDefault()
|
||||
if (isMouseDownInStream) {
|
||||
setDidDragInStream(true)
|
||||
}
|
||||
@ -393,7 +396,7 @@ export function App() {
|
||||
...streamDimensions,
|
||||
})
|
||||
|
||||
const interaction = ctrlKey ? 'pan' : 'rotate'
|
||||
const interaction = ctrlKey ? 'zoom' : shiftKey ? 'pan' : 'rotate'
|
||||
|
||||
const newCmdId = uuidv4()
|
||||
setCmdId(newCmdId)
|
||||
@ -432,7 +435,7 @@ export function App() {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="h-screen overflow-hidden relative flex flex-col"
|
||||
className="h-screen overflow-hidden relative flex flex-col cursor-pointer select-none"
|
||||
onMouseMove={handleMouseMove}
|
||||
ref={streamRef}
|
||||
>
|
||||
|
Reference in New Issue
Block a user