I hope someone who has used the Jcrop plug-in to process pictures will take a look at the problems I encountered.
Since the image that needs to be processed is large, I put the image to be cut inside a div, as follows:
<div style="width:700px;height:500px;overflow:scroll"> <img src='imageUpload/<s:property value="imageFileName"/>' id="target"/></div>
Copy after login
Then I set the css attribute of the div for the part that exceeds the display range. overflow: scroll, so that when processing large images, the part beyond the div can be viewed through the scroll bar.
But there is a problem encountered in this way, that is, when the selection box for cropping the picture is moved to an area that requires dragging the scroll bar to display, the cropping box cannot be dragged. As long as the cropping box is clicked, it will move to another location. , so that the image cannot be cropped normally.
If there are any heroes who use Jcrop, please verify whether there is the problem I mentioned, and how to solve it?
We are running out of points, please bear with me!
Reply to the discussion (solution)
Just define the canvas width
Encountered the same problem, has the poster solved it? Could you please let me know.