Created
February 21, 2021 16:33
-
-
Save colinfwren/167c031d032fccbebfeb4dab5655d9b4 to your computer and use it in GitHub Desktop.
Panning a stage in react-konva
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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