Skip to content

Instantly share code, notes, and snippets.

@colinfwren
Created February 21, 2021 16:33
Show Gist options
  • Save colinfwren/167c031d032fccbebfeb4dab5655d9b4 to your computer and use it in GitHub Desktop.
Save colinfwren/167c031d032fccbebfeb4dab5655d9b4 to your computer and use it in GitHub Desktop.
Panning a stage in react-konva
import { Stage, Layer } from 'react-konva';
import MyLargeComponent from './thingToRenderOnStage';
function App() {
return (
<Stage width={window.innerWidth} height={window.innerHeight} draggable>
<Layer id='stuffToShow'>
<MyLargeComponent />
</Layer>
</Stage>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment