I'm looking for an approach to drag an image that is clipped within a rectangle that is smaller than the image size. Essentially achieve what is shown in this example https://codepen.io/jonathan/pen/abNGbE.
I investigated using the Draggable utility in Kendo React, trying out the StackBlitz example, but can't quite get it right. I tried setting the HTMLDivElement as the React.useRef
const myimage = React.useRef<HTMLDivElement | null>(null);
and then returning a div component instead of the Button in the example.
return (
<div style={{overflow:'hidden',height:'100px',width:'100px'}} ref={myimage}>
<div style={{position:'relative'}}>
<img
src="https://lh4.googleusercontent.com/-8tqTFxi2ebU/Ufo4j_thf7I/AAAAAAAADFM/_ZBQctm9e8E/w270-h203-no/flower.jpg"
style={{position:'absolute',top:0,left:0,border:0}}
/>
</div>
</div>
);
How can I achieve this effect using a Kendo component?